diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-04 17:14:53 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-04 17:14:53 -0700 |
| commit | 22c52f1eb67a46e60be876fda332ad7d2f338ee7 (patch) | |
| tree | 8aad02e3a9116d450dfc0350e5c1bb3feb8a1d6e /src/codegen.cpp | |
| parent | 4514661cfef1cd0090ba9888b69037af3ef9805a (diff) | |
| download | zig-22c52f1eb67a46e60be876fda332ad7d2f338ee7.tar.gz zig-22c52f1eb67a46e60be876fda332ad7d2f338ee7.zip | |
member functions get a namespaced symbol
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 0a784f8071..08fc24fef3 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1503,7 +1503,8 @@ static void do_code_gen(CodeGen *g) { gen_param_index += 1; } LLVMTypeRef function_type = LLVMFunctionType(ret_type, param_types, param_count, fn_proto->is_var_args); - LLVMValueRef fn = LLVMAddFunction(g->module, buf_ptr(&fn_proto->name), function_type); + + LLVMValueRef fn = LLVMAddFunction(g->module, buf_ptr(&fn_table_entry->symbol_name), function_type); for (int attr_i = 0; attr_i < fn_table_entry->fn_attr_list.length; attr_i += 1) { FnAttrId attr_id = fn_table_entry->fn_attr_list.at(attr_i); @@ -1542,7 +1543,8 @@ static void do_code_gen(CodeGen *g) { unsigned flags = 0; bool is_optimized = g->build_type == CodeGenBuildTypeRelease; LLVMZigDISubprogram *subprogram = LLVMZigCreateFunction(g->dbuilder, - import->block_context->di_scope, buf_ptr(&fn_proto->name), "", import->di_file, line_number, + import->block_context->di_scope, buf_ptr(&fn_table_entry->symbol_name), "", + import->di_file, line_number, create_di_function_type(g, fn_proto, import->di_file), fn_table_entry->internal_linkage, is_definition, scope_line, flags, is_optimized, fn); |
