forked from OSchip/llvm-project
Add even more constatness in MachineDominators.h.
llvm-svn: 175358
This commit is contained in:
parent
6a62c29f6b
commit
1f62596fde
|
|
@ -80,12 +80,12 @@ public:
|
||||||
|
|
||||||
// dominates - Return true if A dominates B. This performs the
|
// dominates - Return true if A dominates B. This performs the
|
||||||
// special checks necessary if A and B are in the same basic block.
|
// special checks necessary if A and B are in the same basic block.
|
||||||
bool dominates(MachineInstr *A, MachineInstr *B) const {
|
bool dominates(const MachineInstr *A, const MachineInstr *B) const {
|
||||||
MachineBasicBlock *BBA = A->getParent(), *BBB = B->getParent();
|
const MachineBasicBlock *BBA = A->getParent(), *BBB = B->getParent();
|
||||||
if (BBA != BBB) return DT->dominates(BBA, BBB);
|
if (BBA != BBB) return DT->dominates(BBA, BBB);
|
||||||
|
|
||||||
// Loop through the basic block until we find A or B.
|
// 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)
|
for (; &*I != A && &*I != B; ++I)
|
||||||
/*empty*/ ;
|
/*empty*/ ;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue