summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-03 00:50:42 +0000
committerChris Lattner <sabre@nondot.org>2009-12-03 00:50:42 +0000
commita48f44d9ee15b2d9f696c5de6f3e60dc84639c0f (patch)
tree37f783e993984e7b0fdd0a0693a337c59f5d3b04 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentf66b72094a9d537a2ec15e6c4d2871b8f58c9aea (diff)
downloadbcm5719-llvm-a48f44d9ee15b2d9f696c5de6f3e60dc84639c0f.tar.gz
bcm5719-llvm-a48f44d9ee15b2d9f696c5de6f3e60dc84639c0f.zip
improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant! llvm-svn: 90365
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index e55e3694bcc..5ef25ca4eed 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -290,7 +290,7 @@ void MachineBasicBlock::updateTerminator() {
} else {
// The block has a fallthrough conditional branch.
MachineBasicBlock *MBBA = *succ_begin();
- MachineBasicBlock *MBBB = *next(succ_begin());
+ MachineBasicBlock *MBBB = *llvm::next(succ_begin());
if (MBBA == TBB) std::swap(MBBB, MBBA);
if (isLayoutSuccessor(TBB)) {
if (TII->ReverseBranchCondition(Cond)) {
@@ -359,7 +359,7 @@ bool MachineBasicBlock::isSuccessor(const MachineBasicBlock *MBB) const {
bool MachineBasicBlock::isLayoutSuccessor(const MachineBasicBlock *MBB) const {
MachineFunction::const_iterator I(this);
- return next(I) == MachineFunction::const_iterator(MBB);
+ return llvm::next(I) == MachineFunction::const_iterator(MBB);
}
bool MachineBasicBlock::canFallThrough() {
@@ -461,7 +461,8 @@ bool MachineBasicBlock::CorrectExtraCFGEdges(MachineBasicBlock *DestA,
bool MadeChange = false;
bool AddedFallThrough = false;
- MachineFunction::iterator FallThru = next(MachineFunction::iterator(this));
+ MachineFunction::iterator FallThru =
+ llvm::next(MachineFunction::iterator(this));
// If this block ends with a conditional branch that falls through to its
// successor, set DestB as the successor.
OpenPOWER on IntegriCloud