Const correctness fixes

llvm-svn: 7349
This commit is contained in:
Chris Lattner 2003-07-26 23:24:56 +00:00
parent 0ed86aca71
commit 414832fea6
2 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ void MachineFunction::print(std::ostream &OS) const {
getConstantPool()->print(OS);
for (const_iterator BB = begin(); BB != end(); ++BB) {
BasicBlock *LBB = BB->getBasicBlock();
const BasicBlock *LBB = BB->getBasicBlock();
OS << "\n" << LBB->getName() << " (" << (const void*)LBB << "):\n";
for (MachineBasicBlock::const_iterator I = BB->begin(); I != BB->end();++I){
OS << "\t";

View File

@ -200,8 +200,8 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) {
// at an appropriate point later.
//
bool ValueIsLive = false;
BasicBlock *BB = opBlock.getBasicBlock();
for (succ_iterator SI = succ_begin(BB), E = succ_end(BB);
const BasicBlock *BB = opBlock.getBasicBlock();
for (succ_const_iterator SI = succ_begin(BB), E = succ_end(BB);
SI != E && !ValueIsLive; ++SI) {
const std::pair<MachineBasicBlock*, unsigned> &
SuccInfo = LV->getBasicBlockInfo(*SI);