[llvm] r175608 - Fully qualify llvm::next to avoid ambiguity when building as C++11.

David Blaikie dblaikie at gmail.com
Tue Feb 19 23:39:21 PST 2013


Author: dblaikie
Date: Wed Feb 20 01:39:20 2013
New Revision: 175608

URL: http://llvm.org/viewvc/llvm-project?rev=175608&view=rev
Log:
Fully qualify llvm::next to avoid ambiguity when building as C++11.

Modified:
    llvm/trunk/lib/CodeGen/LiveInterval.cpp
    llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=175608&r1=175607&r2=175608&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Wed Feb 20 01:39:20 2013
@@ -440,7 +440,7 @@ void LiveInterval::join(LiveInterval &Ot
 
     iterator OutIt = begin();
     OutIt->valno = NewVNInfo[LHSValNoAssignments[OutIt->valno->id]];
-    for (iterator I = next(OutIt), E = end(); I != E; ++I) {
+    for (iterator I = llvm::next(OutIt), E = end(); I != E; ++I) {
       VNInfo* nextValNo = NewVNInfo[LHSValNoAssignments[I->valno->id]];
       assert(nextValNo != 0 && "Huh?");
 

Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=175608&r1=175607&r2=175608&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Feb 20 01:39:20 2013
@@ -1157,7 +1157,7 @@ tryInstructionTransform(MachineBasicBloc
             Begin = MachineBasicBlock::iterator(NewMIs[0]);
             if (Begin != MBB->begin())
               --Begin;
-            End = next(MachineBasicBlock::iterator(MI));
+            End = llvm::next(MachineBasicBlock::iterator(MI));
 
             for (MachineInstr::const_mop_iterator MOI = MI.operands_begin(),
                  MOE = MI.operands_end(); MOI != MOE; ++MOI) {
@@ -1562,7 +1562,8 @@ eliminateRegSequence(MachineBasicBlock::
     DEBUG(dbgs() << "Inserted: " << *CopyMI);
   }
 
-  MachineBasicBlock::iterator EndMBBI = next(MachineBasicBlock::iterator(MI));
+  MachineBasicBlock::iterator EndMBBI =
+      llvm::next(MachineBasicBlock::iterator(MI));
 
   if (!DefEmitted) {
     DEBUG(dbgs() << "Turned: " << *MI << " into an IMPLICIT_DEF");





More information about the llvm-commits mailing list