aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-03 15:14:18 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-03 15:14:18 -0500
commit5a86c0499694d4dafa3af97c6b26860714bc8983 (patch)
tree36c7b589fa136e75ae8f104009f360fc2ee25431 /src/ir_print.cpp
parent8c9016b6d1a62da847faf95b6124515cdcd9fe0b (diff)
downloadzig-5a86c0499694d4dafa3af97c6b26860714bc8983.tar.gz
zig-5a86c0499694d4dafa3af97c6b26860714bc8983.zip
add volatileStore() builtin function
See #238 We can revisit how volatile will work later - for now here's a builtin function to do it.
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index fa7ff97d81..a5ca1f1197 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -299,6 +299,9 @@ static void ir_print_store_ptr(IrPrint *irp, IrInstructionStorePtr *instruction)
ir_print_var_instruction(irp, instruction->ptr);
fprintf(irp->f, " = ");
ir_print_other_instruction(irp, instruction->value);
+ if (instruction->is_volatile) {
+ fprintf(irp->f, " // volatile");
+ }
}
static void ir_print_typeof(IrPrint *irp, IrInstructionTypeOf *instruction) {