[llvm] r175358 - Add even more constatness in MachineDominators.h.

Jakub Staszak kubastaszak at gmail.com
Sat Feb 16 04:36:32 PST 2013


Author: kuba
Date: Sat Feb 16 06:36:32 2013
New Revision: 175358

URL: http://llvm.org/viewvc/llvm-project?rev=175358&view=rev
Log:
Add even more constatness in MachineDominators.h.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineDominators.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineDominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineDominators.h?rev=175358&r1=175357&r2=175358&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineDominators.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineDominators.h Sat Feb 16 06:36:32 2013
@@ -80,12 +80,12 @@ public:
 
   // dominates - Return true if A dominates B. This performs the
   // special checks necessary if A and B are in the same basic block.
-  bool dominates(MachineInstr *A, MachineInstr *B) const {
-    MachineBasicBlock *BBA = A->getParent(), *BBB = B->getParent();
+  bool dominates(const MachineInstr *A, const MachineInstr *B) const {
+    const MachineBasicBlock *BBA = A->getParent(), *BBB = B->getParent();
     if (BBA != BBB) return DT->dominates(BBA, BBB);
 
     // Loop through the basic block until we find A or B.
-    MachineBasicBlock::iterator I = BBA->begin();
+    MachineBasicBlock::const_iterator I = BBA->begin();
     for (; &*I != A && &*I != B; ++I)
       /*empty*/ ;
 





More information about the llvm-commits mailing list