Commit d151c58788

Andrew Kelley <superjoe30@gmail.com>
2017-02-05 19:14:42
all functions are nounwind because zig does not support exceptions
1 parent 52eec6b
Changed files (1)
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);