aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-12-11 00:43:23 -0500
committerAndrew Kelley <superjoe30@gmail.com>2016-12-11 00:43:23 -0500
commit10cea15cc3061272a0ed05fafe9e762f6454fafc (patch)
treefc8a9cae06d4232ebf22a71ef9c59986f57f38bb /src/ir_print.cpp
parent2dd85d52cc4c4c6a32704f187b41a06401400f0c (diff)
downloadzig-10cea15cc3061272a0ed05fafe9e762f6454fafc.tar.gz
zig-10cea15cc3061272a0ed05fafe9e762f6454fafc.zip
IR: implement embedFile builtin
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index 738ec8cf4c..d8d41b6ebe 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -713,6 +713,12 @@ static void ir_print_c_undef(IrPrint *irp, IrInstructionCUndef *instruction) {
fprintf(irp->f, ")");
}
+static void ir_print_embed_file(IrPrint *irp, IrInstructionEmbedFile *instruction) {
+ fprintf(irp->f, "@embedFile(");
+ ir_print_other_instruction(irp, instruction->name);
+ fprintf(irp->f, ")");
+}
+
static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
ir_print_prefix(irp, instruction);
switch (instruction->id) {
@@ -874,6 +880,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
case IrInstructionIdCUndef:
ir_print_c_undef(irp, (IrInstructionCUndef *)instruction);
break;
+ case IrInstructionIdEmbedFile:
+ ir_print_embed_file(irp, (IrInstructionEmbedFile *)instruction);
+ break;
}
fprintf(irp->f, "\n");
}