From ce11d6d16cf388ec7abff9680ee3a263185a9986 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 11 Jul 2018 21:37:47 -0400 Subject: ir: refactor lvalues --- src/ir_print.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 780cf9e756..6182958d0a 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1005,10 +1005,8 @@ static void ir_print_ptr_type(IrPrint *irp, IrInstructionPtrType *instruction) { } static void ir_print_decl_ref(IrPrint *irp, IrInstructionDeclRef *instruction) { - const char *ptr_str = instruction->lval.is_ptr ? "ptr " : ""; - const char *const_str = instruction->lval.is_const ? "const " : ""; - const char *volatile_str = instruction->lval.is_volatile ? "volatile " : ""; - fprintf(irp->f, "declref %s%s%s%s", const_str, volatile_str, ptr_str, buf_ptr(instruction->tld->name)); + const char *ptr_str = (instruction->lval == LValPtr) ? "ptr " : ""; + fprintf(irp->f, "declref %s%s", ptr_str, buf_ptr(instruction->tld->name)); } static void ir_print_panic(IrPrint *irp, IrInstructionPanic *instruction) { -- cgit v1.2.3