String debug info. Minor cleanup of derived / composite debug info output.

This commit is contained in:
lachsinc
2018-09-19 01:52:08 +10:00
parent e7d72f6848
commit cce5e595e5
2 changed files with 85 additions and 20 deletions

View File

@@ -2067,19 +2067,21 @@ void print_llvm_ir(irGen *ir) {
} else {
ir_fprintf(f, "!DICompositeType("
"name: \"%.*s\""
", scope: !%d"
", file: !%d"
", line: %td"
", size: %d"
", align: %d"
", tag: ",
LIT(di->CompositeType.name),
di->CompositeType.scope->id,
di->CompositeType.file->id,
di->CompositeType.pos.line,
di->CompositeType.size,
di->CompositeType.align);
ir_print_debug_encoding(f, irDebugInfo_CompositeType, di->CompositeType.tag);
if (di->CompositeType.scope) {
ir_fprintf(f, ", scope: !%d"
", file: !%d"
", line: %td",
di->CompositeType.scope->id,
di->CompositeType.file->id,
di->CompositeType.pos.line);
}
if (di->CompositeType.base_type) {
GB_ASSERT(di->CompositeType.tag == irDebugBasicEncoding_enumeration_type);
ir_fprintf(f, ", baseType: !%d", di->CompositeType.base_type->id);