From d151c58788098778c07f764d2256955cb36a832f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 5 Feb 2017 13:14:42 -0500 Subject: all functions are nounwind because zig does not support exceptions --- src/codegen.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/codegen.cpp') 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); -- cgit v1.2.3