mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Declare Sentinel fragments as mutable to get rid
of some pointless casting. This fragment logically does not belong to ilist anyway, but to "ghostly" NodeType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,14 +38,14 @@ template<> struct ilist_traits<Instruction>
|
||||
// NodeTy, which becomes the sentinel. Dereferencing the sentinel is
|
||||
// forbidden (save the ilist_node<NodeTy>) so no one will ever notice
|
||||
// the superposition.
|
||||
return const_cast<Instruction*>(static_cast<const Instruction*>(&Sentinel));
|
||||
return static_cast<Instruction*>(&Sentinel);
|
||||
}
|
||||
static void destroySentinel(Instruction*) {}
|
||||
static iplist<Instruction> &getList(BasicBlock *BB);
|
||||
static ValueSymbolTable *getSymTab(BasicBlock *ItemParent);
|
||||
static int getListOffset();
|
||||
private:
|
||||
ilist_node<Instruction> Sentinel;
|
||||
mutable ilist_node<Instruction> Sentinel;
|
||||
};
|
||||
|
||||
/// This represents a single basic block in LLVM. A basic block is simply a
|
||||
|
||||
Reference in New Issue
Block a user