mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user