We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d70de8 commit 38db63cCopy full SHA for 38db63c
lib/SILOptimizer/IPO/ClosureSpecializer.cpp
@@ -680,9 +680,11 @@ static bool isSupportedClosure(const SILInstruction *Closure) {
680
// This is a temporary limitation.
681
auto ClosureCallee = FRI->getReferencedFunction();
682
auto ClosureCalleeConv = ClosureCallee->getConventions();
683
- unsigned ClosureArgIdx =
+ unsigned ClosureArgIdxBase =
684
ClosureCalleeConv.getNumSILArguments() - PAI->getNumArguments();
685
- for (auto Arg : PAI->getArguments()) {
+ for (auto pair : llvm::enumerate(PAI->getArguments())) {
686
+ auto Arg = pair.value();
687
+ auto ClosureArgIdx = pair.index() + ClosureArgIdxBase;
688
SILType ArgTy = Arg->getType();
689
// If our argument is an object, continue...
690
if (ArgTy.isObject()) {
0 commit comments