diff options
-rw-r--r-- | lib/Target/SparcV9/SparcV9CodeEmitter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/SparcV9/SparcV9CodeEmitter.h | 6 | ||||
-rw-r--r-- | lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp index d7ca70c..c82d33d 100644 --- a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp +++ b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp @@ -571,7 +571,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI, // Duplicate code of the above case for VirtualRegister, BasicBlock... // It should really hit this case, but Sparc backend uses VRegs instead DEBUG(std::cerr << "Saving reference to MBB\n"); - BasicBlock *BB = MO.getMachineBasicBlock()->getBasicBlock(); + const BasicBlock *BB = MO.getMachineBasicBlock()->getBasicBlock(); unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue(); BBRefs.push_back(std::make_pair(BB, std::make_pair(CurrPC, &MI))); } else if (MO.isExternalSymbol()) { diff --git a/lib/Target/SparcV9/SparcV9CodeEmitter.h b/lib/Target/SparcV9/SparcV9CodeEmitter.h index ebadc37..9e3b5bd 100644 --- a/lib/Target/SparcV9/SparcV9CodeEmitter.h +++ b/lib/Target/SparcV9/SparcV9CodeEmitter.h @@ -18,13 +18,13 @@ class MachineOperand; class SparcV9CodeEmitter : public MachineFunctionPass { TargetMachine &TM; MachineCodeEmitter &MCE; - BasicBlock *currBB; + const BasicBlock *currBB; // Tracks which instruction references which BasicBlock - std::vector<std::pair<BasicBlock*, + std::vector<std::pair<const BasicBlock*, std::pair<unsigned*,MachineInstr*> > > BBRefs; // Tracks where each BasicBlock starts - std::map<BasicBlock*, long> BBLocations; + std::map<const BasicBlock*, long> BBLocations; // Tracks locations of Constants which are laid out in memory (e.g. FP) // But we also need to map Constants to ConstantPool indices diff --git a/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp b/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp index babb470..de04cb6 100644 --- a/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp +++ b/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp @@ -133,8 +133,8 @@ void InsertPrologEpilogCode::InsertEpilogCode(MachineFunction &MF) for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { MachineBasicBlock &MBB = *I; - BasicBlock &BB = *I->getBasicBlock(); - Instruction *TermInst = (Instruction*)BB.getTerminator(); + const BasicBlock &BB = *I->getBasicBlock(); + const Instruction *TermInst = (Instruction*)BB.getTerminator(); if (TermInst->getOpcode() == Instruction::Ret) { int ZR = TM.getRegInfo().getZeroRegNum(); |