From eb3958fafdb439f963bbd3437ba6cf375304131b Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Wed, 17 Aug 2016 20:07:29 +0000 Subject: [GraphWriter] Change GraphWriter to use NodeRef in GraphTraits Summary: This is part of the "NodeType* -> NodeRef" migration. Notice that since GraphWriter prints object address as identity, I added a static_assert on NodeRef to be a pointer type. Reviewers: dblaikie Subscribers: llvm-commits, MatzeB Differential Revision: https://reviews.llvm.org/D23580 llvm-svn: 278966 --- llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp index faf9eccda21..22d47fe1443 100644 --- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -53,6 +53,7 @@ namespace llvm { template <> struct GraphTraits { typedef const MachineBasicBlock NodeType; + typedef const MachineBasicBlock *NodeRef; typedef MachineBasicBlock::const_succ_iterator ChildIteratorType; typedef MachineFunction::const_iterator nodes_iterator; -- cgit v1.2.3