authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-02-05 01:57:49-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-02-05 01:57:49-05:00
logd2f1f57fa410b781f17ab7b04311af50ff775070
tree8c2bd88bbd0f1930259948d2cbde776df57d8aeb
parent74d41ce44ba964bea171e964a1e4a1bab8edc8c0

even external functions which provide definitions get nounwind


1 files changed, 1 insertions(+), 1 deletions(-)

src/codegen.cpp+1-1
......@@ -268,7 +268,7 @@ static LLVMValueRef fn_llvm_value(CodeGen *g, FnTableEntry *fn_table_entry) {
268268 LLVMAddFunctionAttr(fn_table_entry->llvm_value, LLVMNoReturnAttribute);
269269 }
270270 LLVMSetFunctionCallConv(fn_table_entry->llvm_value, fn_type->data.fn.calling_convention);
271 if (!fn_type->data.fn.fn_type_id.is_extern) {
271 if (!fn_type->data.fn.fn_type_id.is_extern || fn_table_entry->fn_def_node != nullptr) {
272272 LLVMAddFunctionAttr(fn_table_entry->llvm_value, LLVMNoUnwindAttribute);
273273 }
274274 if (!g->is_release_build && fn_table_entry->fn_inline != FnInlineAlways) {