This commit is contained in:
lachsinc
2018-10-01 01:10:22 +10:00
parent f8d7f42208
commit b37b7a0f72
2 changed files with 5 additions and 12 deletions

View File

@@ -28,7 +28,6 @@ struct irModule {
irDebugInfo * debug_compile_unit;
irDebugInfo * debug_all_enums; // TODO(lachsinc): Move into irDebugInfo_CompileUnit
irDebugInfo * debug_all_globals; // TODO(lachsinc): Move into irDebugInfo_CompileUnit
irDebugInfo * curr_debug_loc; // TODO(lachsinc): Temporary, remove me.
Array<irDebugInfo *> debug_location_stack;
@@ -599,7 +598,6 @@ struct irDebugInfo {
struct {
irDebugEncoding tag;
String name;
String identifier; // TODO(lachsinc): Unused?
irDebugInfo * scope;
irDebugInfo * file;
TokenPos pos;
@@ -624,7 +622,6 @@ struct irDebugInfo {
TokenPos pos;
irDebugInfo *type;
irValue *variable;
// irDebugInfo *declaration;
} GlobalVariable;
struct {
String name;
@@ -1612,6 +1609,7 @@ irDebugEncoding ir_debug_encoding_for_basic(BasicKind kind) {
case Basic_i64:
case Basic_int:
case Basic_rune: // TODO(lachsinc) signed or unsigned?
case Basic_typeid:
return irDebugBasicEncoding_signed;
case Basic_u16:
@@ -1619,7 +1617,6 @@ irDebugEncoding ir_debug_encoding_for_basic(BasicKind kind) {
case Basic_u64:
case Basic_uint:
case Basic_uintptr: // TODO(lachsinc) unsigned or address?
case Basic_typeid: // TODO(lachsinc) underlying type?
return irDebugBasicEncoding_unsigned;
// case Basic_f16:

View File

@@ -1943,7 +1943,6 @@ void print_llvm_ir(irGen *ir) {
"language: DW_LANG_C_plus_plus" // Is this good enough?
", file: !%d"
", producer: \"Odin %.*s\""
// ", flags: \"\"" // TODO(lachsinc): Removed for now, check if correct
", runtimeVersion: 0"
", isOptimized: false"
", emissionKind: FullDebug"
@@ -1973,7 +1972,7 @@ void print_llvm_ir(irGen *ir) {
", line: %td"
", scopeLine: %td"
", isDefinition: true"
", isLocal: false" // TODO(lachsinc): This used to be always set to true, pretend no local for now. We need to check if scope == file.
", isLocal: false" // TODO(lachsinc): Is this fine?
", flags: DIFlagPrototyped"
", isOptimized: false"
", unit: !%d"
@@ -1990,9 +1989,6 @@ void print_llvm_ir(irGen *ir) {
break;
case irDebugInfo_Location: {
GB_ASSERT_NOT_NULL(di->Location.scope);
// TODO(lachsinc): Temporary.
GB_ASSERT(di->Location.pos.line >= 0 && di->Location.pos.line < 65536);
GB_ASSERT(di->Location.pos.column >= 0 && di->Location.pos.column < 65536);
ir_fprintf(f, "!DILocation("
"line: %td"
", column: %td"
@@ -2024,8 +2020,8 @@ void print_llvm_ir(irGen *ir) {
", file: !%d"
", line: %d"
", type: !%d"
", isLocal: true" // TODO(lachsinc): Check is_foreign ??
", isDefinition: true)", // TODO(lachsinc): Check is_foreign ??
", isLocal: true" // TODO(lachsinc): Check locality ??
", isDefinition: true)", // TODO(lachsinc): ??
LIT(di->GlobalVariable.name),
di->GlobalVariable.scope->id,
di->GlobalVariable.file->id,
@@ -2046,7 +2042,7 @@ void print_llvm_ir(irGen *ir) {
di->LocalVariable.pos.line,
di->LocalVariable.type->id);
if (di->LocalVariable.arg > 0) {
GB_PANIC("Param 'Arg' debug info not yet implemented"); // TODO(lachsinc):
GB_PANIC("Param 'Arg' debug info not yet implemented"); // TODO(lachsinc): Proper param index support.
ir_fprintf(f, ", arg: %d", di->LocalVariable.arg);
}
ir_write_byte(f, ')');