diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-02-03 15:14:18 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-02-03 15:14:18 -0500 |
| commit | 5a86c0499694d4dafa3af97c6b26860714bc8983 (patch) | |
| tree | 36c7b589fa136e75ae8f104009f360fc2ee25431 /src/ir_print.cpp | |
| parent | 8c9016b6d1a62da847faf95b6124515cdcd9fe0b (diff) | |
| download | zig-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.cpp | 3 |
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) { |
