From b37b7a0f72ac8aa71bf5e387ccbb5af0da6237d2 Mon Sep 17 00:00:00 2001 From: lachsinc Date: Mon, 1 Oct 2018 01:10:22 +1000 Subject: [PATCH] Cleanup. --- src/ir.cpp | 5 +---- src/ir_print.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/ir.cpp b/src/ir.cpp index e0d7229ee..7518dca29 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -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 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: diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 1511a3e85..0732d0af6 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -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, ')');