diff options
| author | lachsinc <lachlansinclair@gmail.com> | 2018-10-05 14:33:39 +1000 |
|---|---|---|
| committer | lachsinc <lachlansinclair@gmail.com> | 2018-10-05 14:33:39 +1000 |
| commit | 11ea03d2e8de0cf9a6628baef5b1b8ec612ae418 (patch) | |
| tree | 06cd513255ef61918400f17787d3097a7099792f /src/ir_print.cpp | |
| parent | 99b4d59f44842327eaee08886a7aa0cbd538588d (diff) | |
Tuple debug info (untested). Generated locals now flow through debug info.
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |