aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorlachsinc <lachlansinclair@gmail.com>2018-10-04 13:43:52 +1000
committerlachsinc <lachlansinclair@gmail.com>2018-10-04 13:43:52 +1000
commit79d49f1955c7ae8509f1221fe533a1df5ef4bfaa (patch)
tree9afdce2174886742abcbe77b27f66a6d8aa39c4c /src/ir_print.cpp
parent1ccc8700e4f8d12650f95fad11f617e70dd870c7 (diff)
Lexical block debug info.
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index beb465fdd..dc0a84900 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -1987,7 +1987,7 @@ void print_llvm_ir(irGen *ir) {
di->Proc.types->id);
ir_write_byte(f, ')'); // !DISubprogram(
break;
- case irDebugInfo_Location: {
+ case irDebugInfo_Location:
GB_ASSERT_NOT_NULL(di->Location.scope);
ir_fprintf(f, "!DILocation("
"line: %td"
@@ -1996,7 +1996,20 @@ void print_llvm_ir(irGen *ir) {
di->Location.pos.line,
di->Location.pos.column,
di->Location.scope->id);
- break;}
+ break;
+ case irDebugInfo_LexicalBlock:
+ GB_ASSERT_NOT_NULL(di->LexicalBlock.file);
+ GB_ASSERT_NOT_NULL(di->LexicalBlock.scope);
+ ir_fprintf(f, "distinct !DILexicalBlock("
+ "line: %td"
+ ", column: %td"
+ ", file: !%d"
+ ", scope: !%d)",
+ di->LexicalBlock.pos.line,
+ di->LexicalBlock.pos.column,
+ di->LexicalBlock.file->id,
+ di->LexicalBlock.scope->id);
+ break;
case irDebugInfo_GlobalVariableExpression: {
ir_fprintf(f, "!DIGlobalVariableExpression("
"var: !%d"