aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-05-14 20:40:14 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-05-18 15:32:34 -0700
commitfbb6d1d7ee634ac04df7b53abec842c30fafefed (patch)
tree6570fd427b470b0f85231d566f16cf006841ec16 /src/analyze.cpp
parent7edef4f3fd8e260c69142741e750b3e6893434b8 (diff)
downloadzig-fbb6d1d7ee634ac04df7b53abec842c30fafefed.tar.gz
zig-fbb6d1d7ee634ac04df7b53abec842c30fafefed.zip
support extern C ABI for return types
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index d28b4152b5..937a7627de 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -702,7 +702,7 @@ TypeTableEntry *get_fn_type(CodeGen *g, FnTypeId *fn_type_id) {
// next, loop over the parameters again and compute debug information
// and codegen information
- bool first_arg_return = handle_is_ptr(fn_type_id->return_type);
+ bool first_arg_return = !fn_type_id->is_extern && handle_is_ptr(fn_type_id->return_type);
// +1 for maybe making the first argument the return value
LLVMTypeRef *gen_param_types = allocate<LLVMTypeRef>(1 + fn_type_id->param_count);
// +1 because 0 is the return type and +1 for maybe making first arg ret val