| author | |
| committer | |
| log | 9dae796fe3bd08c4e636f09d1849f6ce2879a50b |
| tree | ea58c1305b9fbac2199f3dc1c60afd39290e9391 |
| parent | 79c2ceb2d59af1f84edcc7a5a683ecf38dfb1bf6 |
2 files changed, 5 insertions(+), 1 deletions(-)
src/codegen.cpp+3-1| ... | @@ -590,8 +590,10 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) { | ... | @@ -590,8 +590,10 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) { |
| 590 | bool is_optimized = g->build_mode != BuildModeDebug; | 590 | bool is_optimized = g->build_mode != BuildModeDebug; |
| 591 | bool is_internal_linkage = (fn_table_entry->body_node != nullptr && | 591 | bool is_internal_linkage = (fn_table_entry->body_node != nullptr && |
| 592 | fn_table_entry->export_list.length == 0); | 592 | fn_table_entry->export_list.length == 0); |
| 593 | ZigLLVMDIScope *fn_di_scope = get_di_scope(g, scope->parent); | ||
| 594 | assert(fn_di_scope != nullptr); | ||
| 593 | ZigLLVMDISubprogram *subprogram = ZigLLVMCreateFunction(g->dbuilder, | 595 | ZigLLVMDISubprogram *subprogram = ZigLLVMCreateFunction(g->dbuilder, |
| 594 | get_di_scope(g, scope->parent), buf_ptr(&fn_table_entry->symbol_name), "", | 596 | fn_di_scope, buf_ptr(&fn_table_entry->symbol_name), "", |
| 595 | import->di_file, line_number, | 597 | import->di_file, line_number, |
| 596 | fn_table_entry->type_entry->di_type, is_internal_linkage, | 598 | fn_table_entry->type_entry->di_type, is_internal_linkage, |
| 597 | is_definition, scope_line, flags, is_optimized, nullptr); | 599 | is_definition, scope_line, flags, is_optimized, nullptr); |
src/ir.cpp+2| ... | @@ -14051,6 +14051,8 @@ static TypeTableEntry *ir_analyze_instruction_c_import(IrAnalyze *ira, IrInstruc | ... | @@ -14051,6 +14051,8 @@ static TypeTableEntry *ir_analyze_instruction_c_import(IrAnalyze *ira, IrInstruc |
| 14051 | child_import->package = new_anonymous_package(); | 14051 | child_import->package = new_anonymous_package(); |
| 14052 | child_import->package->package_table.put(buf_create_from_str("builtin"), ira->codegen->compile_var_package); | 14052 | child_import->package->package_table.put(buf_create_from_str("builtin"), ira->codegen->compile_var_package); |
| 14053 | child_import->package->package_table.put(buf_create_from_str("std"), ira->codegen->std_package); | 14053 | child_import->package->package_table.put(buf_create_from_str("std"), ira->codegen->std_package); |
| 14054 | child_import->di_file = ZigLLVMCreateFile(ira->codegen->dbuilder, | ||
| 14055 | buf_ptr(buf_create_from_str("cimport.h")), buf_ptr(buf_create_from_str("."))); | ||
| 14054 | 14056 | ||
| 14055 | ZigList<ErrorMsg *> errors = {0}; | 14057 | ZigList<ErrorMsg *> errors = {0}; |
| 14056 | 14058 |