aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-04 12:14:38 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-09-04 12:15:15 -0400
commitff4591f0e61266da6cac47644986d381b99dec5b (patch)
tree63da0cc3b61b70a4495d39dd4648e19a7bfdc19c /src/codegen.cpp
parent2bd2a8ea3430b92f0c41d602d12982f776a9a524 (diff)
downloadzig-ff4591f0e61266da6cac47644986d381b99dec5b.tar.gz
zig-ff4591f0e61266da6cac47644986d381b99dec5b.zip
fix llvm assertion when adding callsite sret attr
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 298e89579f..a15ecbaf6e 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -3106,7 +3106,7 @@ static void gen_set_stack_pointer(CodeGen *g, LLVMValueRef aligned_end_addr) {
static void set_call_instr_sret(CodeGen *g, LLVMValueRef call_instr) {
unsigned attr_kind_id = LLVMGetEnumAttributeKindForName("sret", 4);
- LLVMAttributeRef sret_attr = LLVMCreateEnumAttribute(LLVMGetGlobalContext(), attr_kind_id, 1);
+ LLVMAttributeRef sret_attr = LLVMCreateEnumAttribute(LLVMGetGlobalContext(), attr_kind_id, 0);
LLVMAddCallSiteAttribute(call_instr, 1, sret_attr);
}