diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-09-05 12:06:47 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-09-05 12:06:47 +0000 |
commit | ef0a45aaa5b0afff6e3812bd533f151e1ca9ba36 (patch) | |
tree | 5f90fcd8217fbef925e8407782f883ccd5f04d32 /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | |
parent | 8bc659637c740ca8ae678c7d3abd53a813943345 (diff) | |
download | llvm-ef0a45aaa5b0afff6e3812bd533f151e1ca9ba36.zip llvm-ef0a45aaa5b0afff6e3812bd533f151e1ca9ba36.tar.gz llvm-ef0a45aaa5b0afff6e3812bd533f151e1ca9ba36.tar.bz2 |
[WebAssembly] Unbreak the build.
Not sure why ADL isn't working here.
llvm-svn: 280656
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index 33166f5..65bb738 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -332,7 +332,7 @@ static void PlaceBlockMarker(MachineBasicBlock &MBB, MachineFunction &MF, return; assert(&MBB != &MF.front() && "Header blocks shouldn't have predecessors"); - MachineBasicBlock *LayoutPred = &*prev(MachineFunction::iterator(&MBB)); + MachineBasicBlock *LayoutPred = &*std::prev(MachineFunction::iterator(&MBB)); // If the nearest common dominator is inside a more deeply nested context, // walk out to the nearest scope which isn't more deeply nested. @@ -340,7 +340,7 @@ static void PlaceBlockMarker(MachineBasicBlock &MBB, MachineFunction &MF, if (MachineBasicBlock *ScopeTop = ScopeTops[I->getNumber()]) { if (ScopeTop->getNumber() > Header->getNumber()) { // Skip over an intervening scope. - I = next(MachineFunction::iterator(ScopeTop)); + I = std::next(MachineFunction::iterator(ScopeTop)); } else { // We found a scope level at an appropriate depth. Header = ScopeTop; @@ -369,10 +369,11 @@ static void PlaceBlockMarker(MachineBasicBlock &MBB, MachineFunction &MF, // Otherwise, insert the BLOCK as late in Header as we can, but before the // beginning of the local expression tree and any nested BLOCKs. InsertPos = Header->getFirstTerminator(); - while (InsertPos != Header->begin() && IsChild(*prev(InsertPos), MFI) && - prev(InsertPos)->getOpcode() != WebAssembly::LOOP && - prev(InsertPos)->getOpcode() != WebAssembly::END_BLOCK && - prev(InsertPos)->getOpcode() != WebAssembly::END_LOOP) + while (InsertPos != Header->begin() && + IsChild(*std::prev(InsertPos), MFI) && + std::prev(InsertPos)->getOpcode() != WebAssembly::LOOP && + std::prev(InsertPos)->getOpcode() != WebAssembly::END_BLOCK && + std::prev(InsertPos)->getOpcode() != WebAssembly::END_LOOP) --InsertPos; } @@ -406,13 +407,13 @@ static void PlaceLoopMarker( // The operand of a LOOP is the first block after the loop. If the loop is the // bottom of the function, insert a dummy block at the end. MachineBasicBlock *Bottom = LoopBottom(Loop); - auto Iter = next(MachineFunction::iterator(Bottom)); + auto Iter = std::next(MachineFunction::iterator(Bottom)); if (Iter == MF.end()) { MachineBasicBlock *Label = MF.CreateMachineBasicBlock(); // Give it a fake predecessor so that AsmPrinter prints its label. Label->addSuccessor(Label); MF.push_back(Label); - Iter = next(MachineFunction::iterator(Bottom)); + Iter = std::next(MachineFunction::iterator(Bottom)); } MachineBasicBlock *AfterLoop = &*Iter; |