Skip to content

Commit 0fc5ba1

Browse files
authored
Merge pull request #61647 from aschwaighofer/swift_merge_functions_opaque_ptr_fix
Fix SwiftMergeFunctions pass for opaque pointers
2 parents f3e061f + 3919412 commit 0fc5ba1

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)