Adjust to LLVM change that requires sret parameter attributes to be

annotated with the pointee type.

rdar://71808491
This commit is contained in:
Arnold Schwaighofer
2020-12-03 07:13:55 -08:00
parent a83dffe20e
commit 1f16f7ad8a
47 changed files with 185 additions and 166 deletions

View File

@@ -191,7 +191,9 @@ getAccessorForComputedComponent(IRGenModule &IGM,
accessorThunk->addAttribute(2, llvm::Attribute::NoCapture);
accessorThunk->addAttribute(2, llvm::Attribute::NoAlias);
// Output is sret.
accessorThunk->addAttribute(1, llvm::Attribute::StructRet);
accessorThunk->addAttribute(
1, llvm::Attribute::getWithStructRetType(
IGM.getLLVMContext(), thunkParams[0]->getPointerElementType()));
break;
case Setter:
// Original accessor's args should be @in or @out, meaning they won't be