Code generation phases are not allowed to modify the LLVM representation.

Because of this, we'll make the MBB->BB mapping const as it should be

llvm-svn: 7351
This commit is contained in:
Chris Lattner 2003-07-26 23:30:37 +00:00
parent 0c8de4bfca
commit dec94b36d3
1 changed files with 3 additions and 3 deletions

View File

@ -15,15 +15,15 @@ template <typename T> struct ilist_traits;
class MachineBasicBlock {
std::vector<MachineInstr*> Insts;
MachineBasicBlock *Prev, *Next;
BasicBlock *BB;
const BasicBlock *BB;
public:
MachineBasicBlock(BasicBlock *bb = 0) : Prev(0), Next(0), BB(bb) {}
MachineBasicBlock(const BasicBlock *bb = 0) : Prev(0), Next(0), BB(bb) {}
~MachineBasicBlock() {}
/// getBasicBlock - Return the LLVM basic block that this instance
/// corresponded to originally.
///
BasicBlock *getBasicBlock() const { return BB; }
const BasicBlock *getBasicBlock() const { return BB; }
typedef std::vector<MachineInstr*>::iterator iterator;
typedef std::vector<MachineInstr*>::const_iterator const_iterator;