Skip to content

Commit f8ceee3

Browse files
committed
SILOptimizer: use qualified names
Add the missing std:: prefix on the next and prev functions. These are needed after LLVM header updates.
1 parent f5d0ccb commit f8ceee3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ SILCombiner::visitInjectEnumAddrInst(InjectEnumAddrInst *IEAI) {
671671

672672
auto *Term = IEAI->getParent()->getTerminator();
673673
if (isa<CondBranchInst>(Term) || isa<SwitchValueInst>(Term)) {
674-
auto BeforeTerm = prev(prev(IEAI->getParent()->end()));
674+
auto BeforeTerm = std::prev(std::prev(IEAI->getParent()->end()));
675675
auto *SEAI = dyn_cast<SelectEnumAddrInst>(BeforeTerm);
676676
if (!SEAI)
677677
return nullptr;

lib/SILOptimizer/Utils/Local.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ bool ValueLifetimeAnalysis::computeFrontier(Frontier &Fr, Mode mode) {
12311231
// the last use is part of the frontier.
12321232
SILInstruction *LastUser = findLastUserInBlock(BB);
12331233
if (!isa<TermInst>(LastUser)) {
1234-
Fr.push_back(&*next(LastUser->getIterator()));
1234+
Fr.push_back(&*std::next(LastUser->getIterator()));
12351235
continue;
12361236
}
12371237
// In case the last user is a TermInst we add all successor blocks to the

0 commit comments

Comments
 (0)