aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-04 21:49:27 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-04 21:49:27 -0500
commit419e75eb2313b4910921185211201317cbbb400c (patch)
tree3ad2166c30e84a6d7ce075fb48741e336eb87027 /src/ir_print.cpp
parent0d7abc6368a826490f8985634882300b50d81cba (diff)
downloadzig-419e75eb2313b4910921185211201317cbbb400c.tar.gz
zig-419e75eb2313b4910921185211201317cbbb400c.zip
remove volatileStore builtin; add volatile pointers
closes #238
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index b9f33152dd..f7abbc9ae0 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -299,9 +299,6 @@ 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) {
@@ -512,7 +509,8 @@ static void ir_print_array_len(IrPrint *irp, IrInstructionArrayLen *instruction)
static void ir_print_ref(IrPrint *irp, IrInstructionRef *instruction) {
const char *const_str = instruction->is_const ? "const " : "";
- fprintf(irp->f, "%sref ", const_str);
+ const char *volatile_str = instruction->is_volatile ? "volatile " : "";
+ fprintf(irp->f, "%s%sref ", const_str, volatile_str);
ir_print_other_instruction(irp, instruction->value);
}