aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-05 13:14:42 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-05 13:14:42 -0500
commitd151c58788098778c07f764d2256955cb36a832f (patch)
treeaa9c8ea91eb39e744927135673d271cc95c22d0f /src/codegen.cpp
parent52eec6b9a60f18ef9818b38c83e8e056985acebd (diff)
downloadzig-d151c58788098778c07f764d2256955cb36a832f.tar.gz
zig-d151c58788098778c07f764d2256955cb36a832f.zip
all functions are nounwind because zig does not support exceptions
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 9c121adbf4..fbc974506d 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -268,9 +268,7 @@ static LLVMValueRef fn_llvm_value(CodeGen *g, FnTableEntry *fn_table_entry) {
LLVMAddFunctionAttr(fn_table_entry->llvm_value, LLVMNoReturnAttribute);
}
LLVMSetFunctionCallConv(fn_table_entry->llvm_value, fn_type->data.fn.calling_convention);
- if (!fn_type->data.fn.fn_type_id.is_extern || fn_table_entry->fn_def_node != nullptr) {
- LLVMAddFunctionAttr(fn_table_entry->llvm_value, LLVMNoUnwindAttribute);
- }
+ LLVMAddFunctionAttr(fn_table_entry->llvm_value, LLVMNoUnwindAttribute);
if (!g->is_release_build && fn_table_entry->fn_inline != FnInlineAlways) {
ZigLLVMAddFunctionAttr(fn_table_entry->llvm_value, "no-frame-pointer-elim", "true");
ZigLLVMAddFunctionAttr(fn_table_entry->llvm_value, "no-frame-pointer-elim-non-leaf", nullptr);