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 2f7a30c commit ce4d762Copy full SHA for ce4d762
lib/SILOptimizer/IPO/ClosureSpecializer.cpp
@@ -581,9 +581,11 @@ static bool isSupportedClosure(const SILInstruction *Closure) {
581
// This is a temporary limitation.
582
auto ClosureCallee = FRI->getReferencedFunction();
583
auto ClosureCalleeConv = ClosureCallee->getConventions();
584
- unsigned ClosureArgIdx =
+ unsigned ClosureArgIdxBase =
585
ClosureCalleeConv.getNumSILArguments() - PAI->getNumArguments();
586
- for (auto Arg : PAI->getArguments()) {
+ for (auto pair : llvm::enumerate(PAI->getArguments())) {
587
+ auto Arg = pair.value();
588
+ auto ClosureArgIdx = pair.index() + ClosureArgIdxBase;
589
SILType ArgTy = Arg->getType();
590
// If our argument is an object, continue...
591
if (ArgTy.isObject()) {
0 commit comments