From 11ea03d2e8de0cf9a6628baef5b1b8ec612ae418 Mon Sep 17 00:00:00 2001 From: lachsinc Date: Fri, 5 Oct 2018 14:33:39 +1000 Subject: Tuple debug info (untested). Generated locals now flow through debug info. --- src/ir_print.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a4b595289..33bfe440f 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -2044,16 +2044,17 @@ void print_llvm_ir(irGen *ir) { } case irDebugInfo_LocalVariable: { ir_fprintf(f, "!DILocalVariable(" - "name: \"%.*s\"" - ", scope: !%d" + "scope: !%d" ", file: !%d" ", line: %d" ", type: !%d", - LIT(di->LocalVariable.name), di->LocalVariable.scope->id, di->LocalVariable.file->id, di->LocalVariable.pos.line, di->LocalVariable.type->id); + if (di->DerivedType.name.len > 0) { + ir_fprintf(f, ", name: \"%.*s\"", LIT(di->LocalVariable.name)); + } if (di->LocalVariable.arg > 0) { ir_fprintf(f, ", arg: %d", di->LocalVariable.arg); } -- cgit v1.2.3