aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-11-10 15:01:09 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-11-10 15:01:09 -0500
commit6bf1547148caf0c63605a42c8cdea608cf3d4eca (patch)
tree518cb47a9dab91cfb7e7d9491cfe97ed59895d87 /src/codegen.cpp
parent336d81894da2c34a77cffd1bf903ad9e4dcaa7aa (diff)
parent029d37d6a7dc96f71dded5d5a9c8e7477aaa4146 (diff)
downloadzig-6bf1547148caf0c63605a42c8cdea608cf3d4eca.tar.gz
zig-6bf1547148caf0c63605a42c8cdea608cf3d4eca.zip
Merge branch 'darwin-stat'
closes #606
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 38a1a2cbea..248dc7a382 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -408,6 +408,7 @@ static LLVMValueRef fn_llvm_value(CodeGen *g, FnTableEntry *fn_table_entry) {
LLVMValueRef existing_llvm_fn = LLVMGetNamedFunction(g->module, buf_ptr(symbol_name));
if (existing_llvm_fn) {
fn_table_entry->llvm_value = LLVMConstBitCast(existing_llvm_fn, LLVMPointerType(fn_llvm_type, 0));
+ return fn_table_entry->llvm_value;
} else {
fn_table_entry->llvm_value = LLVMAddFunction(g->module, buf_ptr(symbol_name), fn_llvm_type);
}