Revert "stage1: upgrade to new LLVM sret attribute requirement"

This reverts commit 685b5c26b7.

@LemonBoy has a better patch, so reverting this to merge that one.
This commit is contained in:
Andrew Kelley
2021-02-26 13:47:33 -07:00
parent 685b5c26b7
commit 431801707f
3 changed files with 1 additions and 12 deletions

View File

@@ -802,16 +802,6 @@ void ZigLLVMAddByValAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_v
func->setAttributes(new_attr_set);
}
void ZigLLVMAddSRetAttr(LLVMValueRef fn_ref, LLVMTypeRef type_val) {
Function *func = unwrap<Function>(fn_ref);
const AttributeList attr_set = func->getAttributes();
AttrBuilder attr_builder;
Type *llvm_type = unwrap<Type>(type_val);
attr_builder.addStructRetAttr(llvm_type);
const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), 1, attr_builder);
func->setAttributes(new_attr_set);
}
void ZigLLVMAddFunctionAttr(LLVMValueRef fn_ref, const char *attr_name, const char *attr_value) {
Function *func = unwrap<Function>(fn_ref);
const AttributeList attr_set = func->getAttributes();