fix llvm assertion when adding callsite sret attr

master
Andrew Kelley 2018-09-04 12:14:38 -04:00
parent 2bd2a8ea34
commit ff4591f0e6
No known key found for this signature in database
GPG Key ID: 4E7CD66038A4D47C
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}