mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Cleanup.
This commit is contained in:
+1
-4
@@ -28,7 +28,6 @@ struct irModule {
|
|||||||
irDebugInfo * debug_compile_unit;
|
irDebugInfo * debug_compile_unit;
|
||||||
irDebugInfo * debug_all_enums; // TODO(lachsinc): Move into irDebugInfo_CompileUnit
|
irDebugInfo * debug_all_enums; // TODO(lachsinc): Move into irDebugInfo_CompileUnit
|
||||||
irDebugInfo * debug_all_globals; // 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;
|
Array<irDebugInfo *> debug_location_stack;
|
||||||
|
|
||||||
|
|
||||||
@@ -599,7 +598,6 @@ struct irDebugInfo {
|
|||||||
struct {
|
struct {
|
||||||
irDebugEncoding tag;
|
irDebugEncoding tag;
|
||||||
String name;
|
String name;
|
||||||
String identifier; // TODO(lachsinc): Unused?
|
|
||||||
irDebugInfo * scope;
|
irDebugInfo * scope;
|
||||||
irDebugInfo * file;
|
irDebugInfo * file;
|
||||||
TokenPos pos;
|
TokenPos pos;
|
||||||
@@ -624,7 +622,6 @@ struct irDebugInfo {
|
|||||||
TokenPos pos;
|
TokenPos pos;
|
||||||
irDebugInfo *type;
|
irDebugInfo *type;
|
||||||
irValue *variable;
|
irValue *variable;
|
||||||
// irDebugInfo *declaration;
|
|
||||||
} GlobalVariable;
|
} GlobalVariable;
|
||||||
struct {
|
struct {
|
||||||
String name;
|
String name;
|
||||||
@@ -1612,6 +1609,7 @@ irDebugEncoding ir_debug_encoding_for_basic(BasicKind kind) {
|
|||||||
case Basic_i64:
|
case Basic_i64:
|
||||||
case Basic_int:
|
case Basic_int:
|
||||||
case Basic_rune: // TODO(lachsinc) signed or unsigned?
|
case Basic_rune: // TODO(lachsinc) signed or unsigned?
|
||||||
|
case Basic_typeid:
|
||||||
return irDebugBasicEncoding_signed;
|
return irDebugBasicEncoding_signed;
|
||||||
|
|
||||||
case Basic_u16:
|
case Basic_u16:
|
||||||
@@ -1619,7 +1617,6 @@ irDebugEncoding ir_debug_encoding_for_basic(BasicKind kind) {
|
|||||||
case Basic_u64:
|
case Basic_u64:
|
||||||
case Basic_uint:
|
case Basic_uint:
|
||||||
case Basic_uintptr: // TODO(lachsinc) unsigned or address?
|
case Basic_uintptr: // TODO(lachsinc) unsigned or address?
|
||||||
case Basic_typeid: // TODO(lachsinc) underlying type?
|
|
||||||
return irDebugBasicEncoding_unsigned;
|
return irDebugBasicEncoding_unsigned;
|
||||||
|
|
||||||
// case Basic_f16:
|
// case Basic_f16:
|
||||||
|
|||||||
+4
-8
@@ -1943,7 +1943,6 @@ void print_llvm_ir(irGen *ir) {
|
|||||||
"language: DW_LANG_C_plus_plus" // Is this good enough?
|
"language: DW_LANG_C_plus_plus" // Is this good enough?
|
||||||
", file: !%d"
|
", file: !%d"
|
||||||
", producer: \"Odin %.*s\""
|
", producer: \"Odin %.*s\""
|
||||||
// ", flags: \"\"" // TODO(lachsinc): Removed for now, check if correct
|
|
||||||
", runtimeVersion: 0"
|
", runtimeVersion: 0"
|
||||||
", isOptimized: false"
|
", isOptimized: false"
|
||||||
", emissionKind: FullDebug"
|
", emissionKind: FullDebug"
|
||||||
@@ -1973,7 +1972,7 @@ void print_llvm_ir(irGen *ir) {
|
|||||||
", line: %td"
|
", line: %td"
|
||||||
", scopeLine: %td"
|
", scopeLine: %td"
|
||||||
", isDefinition: true"
|
", 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"
|
", flags: DIFlagPrototyped"
|
||||||
", isOptimized: false"
|
", isOptimized: false"
|
||||||
", unit: !%d"
|
", unit: !%d"
|
||||||
@@ -1990,9 +1989,6 @@ void print_llvm_ir(irGen *ir) {
|
|||||||
break;
|
break;
|
||||||
case irDebugInfo_Location: {
|
case irDebugInfo_Location: {
|
||||||
GB_ASSERT_NOT_NULL(di->Location.scope);
|
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("
|
ir_fprintf(f, "!DILocation("
|
||||||
"line: %td"
|
"line: %td"
|
||||||
", column: %td"
|
", column: %td"
|
||||||
@@ -2024,8 +2020,8 @@ void print_llvm_ir(irGen *ir) {
|
|||||||
", file: !%d"
|
", file: !%d"
|
||||||
", line: %d"
|
", line: %d"
|
||||||
", type: !%d"
|
", type: !%d"
|
||||||
", isLocal: true" // TODO(lachsinc): Check is_foreign ??
|
", isLocal: true" // TODO(lachsinc): Check locality ??
|
||||||
", isDefinition: true)", // TODO(lachsinc): Check is_foreign ??
|
", isDefinition: true)", // TODO(lachsinc): ??
|
||||||
LIT(di->GlobalVariable.name),
|
LIT(di->GlobalVariable.name),
|
||||||
di->GlobalVariable.scope->id,
|
di->GlobalVariable.scope->id,
|
||||||
di->GlobalVariable.file->id,
|
di->GlobalVariable.file->id,
|
||||||
@@ -2046,7 +2042,7 @@ void print_llvm_ir(irGen *ir) {
|
|||||||
di->LocalVariable.pos.line,
|
di->LocalVariable.pos.line,
|
||||||
di->LocalVariable.type->id);
|
di->LocalVariable.type->id);
|
||||||
if (di->LocalVariable.arg > 0) {
|
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_fprintf(f, ", arg: %d", di->LocalVariable.arg);
|
||||||
}
|
}
|
||||||
ir_write_byte(f, ')');
|
ir_write_byte(f, ')');
|
||||||
|
|||||||
Reference in New Issue
Block a user