diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 54ac47008f..5a9f3991f2 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -26,14 +26,16 @@ class MachineFunction; template <> struct ilist_traits<MachineInstr> : public ilist_default_traits<MachineInstr> { private: - mutable MachineInstr Sentinel; + mutable ilist_node<MachineInstr> Sentinel; // this is only set by the MachineBasicBlock owning the LiveList friend class MachineBasicBlock; MachineBasicBlock* Parent; public: - MachineInstr *createSentinel() const { return &Sentinel; } + MachineInstr *createSentinel() const { + return static_cast<MachineInstr*>(&Sentinel); + } void destroySentinel(MachineInstr *) const {} void addNodeToList(MachineInstr* N); |