aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 2aca143524..a58832f983 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -467,7 +467,7 @@ static LLVMValueRef fn_llvm_value(CodeGen *g, FnTableEntry *fn_table_entry) {
fn_table_entry->llvm_value, buf_ptr(&fn_export->name));
}
}
- fn_table_entry->llvm_name = LLVMGetValueName(fn_table_entry->llvm_value);
+ fn_table_entry->llvm_name = strdup(LLVMGetValueName(fn_table_entry->llvm_value));
switch (fn_table_entry->fn_inline) {
case FnInlineAlways: