diff options
author | Chris Lattner <sabre@nondot.org> | 2003-07-26 23:30:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-07-26 23:30:37 +0000 |
commit | 1194e9501984daf0d3237ed1bf18a156173e7fd4 (patch) | |
tree | d55c1b19cad57c64be3cdd2d52dfdb9ac03e8bf3 /include/llvm/CodeGen/MachineBasicBlock.h | |
parent | 8d3f8e226d6cac7882e9ffe7482602a7521400c3 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index a2f26891de..96628ef098 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -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; |