aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 689e4357b1..1371f1d0cd 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -37,9 +37,11 @@ class TargetMachine;
template <>
struct ilist_traits<MachineBasicBlock>
: public ilist_default_traits<MachineBasicBlock> {
- mutable MachineBasicBlock Sentinel;
+ mutable ilist_node<MachineBasicBlock> Sentinel;
public:
- MachineBasicBlock *createSentinel() const { return &Sentinel; }
+ MachineBasicBlock *createSentinel() const {
+ return static_cast<MachineBasicBlock*>(&Sentinel);
+ }
void destroySentinel(MachineBasicBlock *) const {}
void addNodeToList(MachineBasicBlock* MBB);