From 5a86c0499694d4dafa3af97c6b26860714bc8983 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 3 Feb 2017 15:14:18 -0500 Subject: add volatileStore() builtin function See #238 We can revisit how volatile will work later - for now here's a builtin function to do it. --- src/ir_print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ir_print.cpp') 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) { -- cgit v1.2.3