From 1194e9501984daf0d3237ed1bf18a156173e7fd4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 26 Jul 2003 23:30:37 +0000 Subject: [PATCH] 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 --- include/llvm/CodeGen/MachineBasicBlock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index a2f26891def..96628ef0985 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -15,15 +15,15 @@ template struct ilist_traits; class MachineBasicBlock { std::vector 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::iterator iterator; typedef std::vector::const_iterator const_iterator; -- 2.34.1