From f2187ed3210377902124b326957f8721bb58733a Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Mon, 22 Aug 2016 21:09:30 +0000 Subject: [GraphTraits] Replace all NodeType usage with NodeRef This should finish the GraphTraits migration. Differential Revision: http://reviews.llvm.org/D23730 llvm-svn: 279475 --- llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp') diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp index 4147e5e1bb6..bda6aa4a2bf 100644 --- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -52,23 +52,19 @@ extern cl::opt ViewHotFreqPercent; namespace llvm { template <> struct GraphTraits { - typedef const MachineBasicBlock NodeType; typedef const MachineBasicBlock *NodeRef; typedef MachineBasicBlock::const_succ_iterator ChildIteratorType; typedef pointer_iterator nodes_iterator; - static inline const NodeType * - getEntryNode(const MachineBlockFrequencyInfo *G) { + static inline NodeRef getEntryNode(const MachineBlockFrequencyInfo *G) { return &G->getFunction()->front(); } - static ChildIteratorType child_begin(const NodeType *N) { + static ChildIteratorType child_begin(const NodeRef N) { return N->succ_begin(); } - static ChildIteratorType child_end(const NodeType *N) { - return N->succ_end(); - } + static ChildIteratorType child_end(const NodeRef N) { return N->succ_end(); } static nodes_iterator nodes_begin(const MachineBlockFrequencyInfo *G) { return nodes_iterator(G->getFunction()->begin()); -- cgit v1.2.3