Skip to content

Commit 3919412

Browse files
committed
Fix SwiftMergeFunctions pass for opaque pointers
Under opaque pointers there is not need to fix-up byval and structret attributes.
1 parent 5b6c814 commit 3919412

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/LLVMPasses/LLVMMergeFunctions.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,9 @@ static llvm::AttributeList
12641264
fixUpTypesInByValAndStructRetAttributes(llvm::FunctionType *fnType,
12651265
llvm::AttributeList attrList) {
12661266
auto &context = fnType->getContext();
1267+
if (!context.supportsTypedPointers())
1268+
return attrList;
1269+
12671270
for (unsigned i = 0; i < fnType->getNumParams(); ++i) {
12681271
auto paramTy = fnType->getParamType(i);
12691272
auto attrListIndex = llvm::AttributeList::FirstArgIndex + i;

0 commit comments

Comments
 (0)