fix const correctness, BB is const, so its predecessors are too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43780 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-11-06 22:07:40 +00:00
parent 6390ae0a4a
commit f67f73a519

View File

@ -155,7 +155,7 @@ bool CodeGenPrepare::CanMergeBlocks(const BasicBlock *BB,
if (!DestBBPN) return true; // no conflict.
// Collect the preds of BB.
SmallPtrSet<BasicBlock*, 16> BBPreds;
SmallPtrSet<const BasicBlock*, 16> BBPreds;
if (const PHINode *BBPN = dyn_cast<PHINode>(BB->begin())) {
// It is faster to get preds from a PHI than with pred_iterator.
for (unsigned i = 0, e = BBPN->getNumIncomingValues(); i != e; ++i)