[llvm] r279475 - [GraphTraits] Replace all NodeType usage with NodeRef
Tim Shen via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 14:09:31 PDT 2016
Author: timshen
Date: Mon Aug 22 16:09:30 2016
New Revision: 279475
URL: http://llvm.org/viewvc/llvm-project?rev=279475&view=rev
Log:
[GraphTraits] Replace all NodeType usage with NodeRef
This should finish the GraphTraits migration.
Differential Revision: http://reviews.llvm.org/D23730
Modified:
llvm/trunk/include/llvm/ADT/GraphTraits.h
llvm/trunk/include/llvm/Analysis/CallGraph.h
llvm/trunk/include/llvm/Analysis/Interval.h
llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
llvm/trunk/include/llvm/Analysis/LoopInfo.h
llvm/trunk/include/llvm/Analysis/PostDominators.h
llvm/trunk/include/llvm/Analysis/RegionIterator.h
llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
llvm/trunk/include/llvm/CodeGen/MachineDominators.h
llvm/trunk/include/llvm/CodeGen/MachineFunction.h
llvm/trunk/include/llvm/CodeGen/MachineLoopInfo.h
llvm/trunk/include/llvm/CodeGen/MachineRegionInfo.h
llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/trunk/include/llvm/IR/CFG.h
llvm/trunk/include/llvm/IR/Dominators.h
llvm/trunk/include/llvm/IR/Type.h
llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp
llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp
llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/trunk/unittests/ADT/SCCIteratorTest.cpp
llvm/trunk/unittests/Analysis/CallGraphTest.cpp
Modified: llvm/trunk/include/llvm/ADT/GraphTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/GraphTraits.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/GraphTraits.h (original)
+++ llvm/trunk/include/llvm/ADT/GraphTraits.h Mon Aug 22 16:09:30 2016
@@ -27,15 +27,10 @@ template<class GraphType>
struct GraphTraits {
// Elements to provide:
- // NOTICE: We are in a transition from migration interfaces that require
- // NodeType *, to NodeRef. NodeRef is required to be cheap to copy, but does
- // not have to be a raw pointer. In the transition, user should define
- // NodeType, and NodeRef = NodeType *.
- //
- // typedef NodeType - Type of Node in the graph
- // typedef NodeRef - NodeType *
+ // typedef NodeRef - Type of Node token in the graph, which should
+ // be cheap to copy.
// typedef ChildIteratorType - Type used to iterate over children in graph,
- // dereference to a NodeRef
+ // dereference to a NodeRef.
// static NodeRef getEntryNode(const GraphType &)
// Return the entry node of the graph
Modified: llvm/trunk/include/llvm/Analysis/CallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CallGraph.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/CallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/CallGraph.h Mon Aug 22 16:09:30 2016
@@ -409,50 +409,48 @@ public:
// Provide graph traits for tranversing call graphs using standard graph
// traversals.
template <> struct GraphTraits<CallGraphNode *> {
- typedef CallGraphNode NodeType;
typedef CallGraphNode *NodeRef;
typedef CallGraphNode::CallRecord CGNPairTy;
- static NodeType *getEntryNode(CallGraphNode *CGN) { return CGN; }
+ static NodeRef getEntryNode(CallGraphNode *CGN) { return CGN; }
static CallGraphNode *CGNGetValue(CGNPairTy P) { return P.second; }
- typedef mapped_iterator<NodeType::iterator, decltype(&CGNGetValue)>
+ typedef mapped_iterator<CallGraphNode::iterator, decltype(&CGNGetValue)>
ChildIteratorType;
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline ChildIteratorType child_begin(NodeRef N) {
return ChildIteratorType(N->begin(), &CGNGetValue);
}
- static inline ChildIteratorType child_end(NodeType *N) {
+ static inline ChildIteratorType child_end(NodeRef N) {
return ChildIteratorType(N->end(), &CGNGetValue);
}
};
template <> struct GraphTraits<const CallGraphNode *> {
- typedef const CallGraphNode NodeType;
typedef const CallGraphNode *NodeRef;
typedef CallGraphNode::CallRecord CGNPairTy;
- static NodeType *getEntryNode(const CallGraphNode *CGN) { return CGN; }
+ static NodeRef getEntryNode(const CallGraphNode *CGN) { return CGN; }
static const CallGraphNode *CGNGetValue(CGNPairTy P) { return P.second; }
- typedef mapped_iterator<NodeType::const_iterator, decltype(&CGNGetValue)>
+ typedef mapped_iterator<CallGraphNode::const_iterator, decltype(&CGNGetValue)>
ChildIteratorType;
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline ChildIteratorType child_begin(NodeRef N) {
return ChildIteratorType(N->begin(), &CGNGetValue);
}
- static inline ChildIteratorType child_end(NodeType *N) {
+ static inline ChildIteratorType child_end(NodeRef N) {
return ChildIteratorType(N->end(), &CGNGetValue);
}
};
template <>
struct GraphTraits<CallGraph *> : public GraphTraits<CallGraphNode *> {
- static NodeType *getEntryNode(CallGraph *CGN) {
+ static NodeRef getEntryNode(CallGraph *CGN) {
return CGN->getExternalCallingNode(); // Start at the external node!
}
typedef std::pair<const Function *const, std::unique_ptr<CallGraphNode>>
@@ -475,7 +473,7 @@ struct GraphTraits<CallGraph *> : public
template <>
struct GraphTraits<const CallGraph *> : public GraphTraits<
const CallGraphNode *> {
- static NodeType *getEntryNode(const CallGraph *CGN) {
+ static NodeRef getEntryNode(const CallGraph *CGN) {
return CGN->getExternalCallingNode(); // Start at the external node!
}
typedef std::pair<const Function *const, std::unique_ptr<CallGraphNode>>
Modified: llvm/trunk/include/llvm/Analysis/Interval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Interval.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/Interval.h (original)
+++ llvm/trunk/include/llvm/Analysis/Interval.h Mon Aug 22 16:09:30 2016
@@ -121,30 +121,26 @@ inline Interval::pred_iterator pred_end(
}
template <> struct GraphTraits<Interval*> {
- typedef Interval NodeType;
+ typedef Interval *NodeRef;
typedef Interval::succ_iterator ChildIteratorType;
- static NodeType *getEntryNode(Interval *I) { return I; }
+ static NodeRef getEntryNode(Interval *I) { return I; }
/// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline ChildIteratorType child_begin(NodeRef N) {
return succ_begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return succ_end(N);
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
};
template <> struct GraphTraits<Inverse<Interval*> > {
- typedef Interval NodeType;
+ typedef Interval *NodeRef;
typedef Interval::pred_iterator ChildIteratorType;
- static NodeType *getEntryNode(Inverse<Interval *> G) { return G.Graph; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(Inverse<Interval *> G) { return G.Graph; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return pred_begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return pred_end(N);
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
};
} // End llvm namespace
Modified: llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LazyCallGraph.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LazyCallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/LazyCallGraph.h Mon Aug 22 16:09:30 2016
@@ -953,20 +953,20 @@ inline LazyCallGraph::Node &LazyCallGrap
// Provide GraphTraits specializations for call graphs.
template <> struct GraphTraits<LazyCallGraph::Node *> {
- typedef LazyCallGraph::Node NodeType;
+ typedef LazyCallGraph::Node *NodeRef;
typedef LazyCallGraph::edge_iterator ChildIteratorType;
- static NodeType *getEntryNode(NodeType *N) { return N; }
- static ChildIteratorType child_begin(NodeType *N) { return N->begin(); }
- static ChildIteratorType child_end(NodeType *N) { return N->end(); }
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
template <> struct GraphTraits<LazyCallGraph *> {
- typedef LazyCallGraph::Node NodeType;
+ typedef LazyCallGraph::Node *NodeRef;
typedef LazyCallGraph::edge_iterator ChildIteratorType;
- static NodeType *getEntryNode(NodeType *N) { return N; }
- static ChildIteratorType child_begin(NodeType *N) { return N->begin(); }
- static ChildIteratorType child_end(NodeType *N) { return N->end(); }
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
/// An analysis pass which computes the call graph for a module.
Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Mon Aug 22 16:09:30 2016
@@ -761,31 +761,21 @@ public:
// Allow clients to walk the list of nested loops...
template <> struct GraphTraits<const Loop*> {
- typedef const Loop NodeType;
typedef const Loop *NodeRef;
typedef LoopInfo::iterator ChildIteratorType;
- static NodeType *getEntryNode(const Loop *L) { return L; }
- static inline ChildIteratorType child_begin(NodeType *N) {
- return N->begin();
- }
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->end();
- }
+ static NodeRef getEntryNode(const Loop *L) { return L; }
+ static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
template <> struct GraphTraits<Loop*> {
- typedef Loop NodeType;
typedef Loop *NodeRef;
typedef LoopInfo::iterator ChildIteratorType;
- static NodeType *getEntryNode(Loop *L) { return L; }
- static inline ChildIteratorType child_begin(NodeType *N) {
- return N->begin();
- }
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->end();
- }
+ static NodeRef getEntryNode(Loop *L) { return L; }
+ static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
/// \brief Analysis pass that exposes the \c LoopInfo for a function.
Modified: llvm/trunk/include/llvm/Analysis/PostDominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PostDominators.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/PostDominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/PostDominators.h Mon Aug 22 16:09:30 2016
@@ -89,7 +89,7 @@ FunctionPass* createPostDomTree();
template <> struct GraphTraits<PostDominatorTree*>
: public GraphTraits<DomTreeNode*> {
- static NodeType *getEntryNode(PostDominatorTree *DT) {
+ static NodeRef getEntryNode(PostDominatorTree *DT) {
return DT->getRootNode();
}
Modified: llvm/trunk/include/llvm/Analysis/RegionIterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionIterator.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionIterator.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionIterator.h Mon Aug 22 16:09:30 2016
@@ -255,7 +255,6 @@ inline RNSuccIterator<NodeRef, BlockT, R
#define RegionNodeGraphTraits(NodeT, BlockT, RegionT) \
template <> struct GraphTraits<NodeT *> { \
- typedef NodeT NodeType; \
typedef NodeT *NodeRef; \
typedef RNSuccIterator<NodeRef, BlockT, RegionT> ChildIteratorType; \
static NodeRef getEntryNode(NodeRef N) { return N; } \
@@ -267,7 +266,6 @@ inline RNSuccIterator<NodeRef, BlockT, R
} \
}; \
template <> struct GraphTraits<FlatIt<NodeT *>> { \
- typedef NodeT NodeType; \
typedef NodeT *NodeRef; \
typedef RNSuccIterator<FlatIt<NodeRef>, BlockT, RegionT> \
ChildIteratorType; \
Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Aug 22 16:09:30 2016
@@ -728,31 +728,25 @@ struct MBB2NumberFunctor :
//
template <> struct GraphTraits<MachineBasicBlock *> {
- typedef MachineBasicBlock NodeType;
typedef MachineBasicBlock *NodeRef;
typedef MachineBasicBlock::succ_iterator ChildIteratorType;
- static NodeType *getEntryNode(MachineBasicBlock *BB) { return BB; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(MachineBasicBlock *BB) { return BB; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->succ_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->succ_end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
};
template <> struct GraphTraits<const MachineBasicBlock *> {
- typedef const MachineBasicBlock NodeType;
typedef const MachineBasicBlock *NodeRef;
typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
- static NodeType *getEntryNode(const MachineBasicBlock *BB) { return BB; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(const MachineBasicBlock *BB) { return BB; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->succ_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->succ_end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
};
// Provide specializations of GraphTraits to be able to treat a
@@ -762,33 +756,27 @@ template <> struct GraphTraits<const Mac
// instead of the successor edges.
//
template <> struct GraphTraits<Inverse<MachineBasicBlock*> > {
- typedef MachineBasicBlock NodeType;
typedef MachineBasicBlock *NodeRef;
typedef MachineBasicBlock::pred_iterator ChildIteratorType;
- static NodeType *getEntryNode(Inverse<MachineBasicBlock *> G) {
+ static NodeRef getEntryNode(Inverse<MachineBasicBlock *> G) {
return G.Graph;
}
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->pred_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->pred_end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->pred_end(); }
};
template <> struct GraphTraits<Inverse<const MachineBasicBlock*> > {
- typedef const MachineBasicBlock NodeType;
typedef const MachineBasicBlock *NodeRef;
typedef MachineBasicBlock::const_pred_iterator ChildIteratorType;
- static NodeType *getEntryNode(Inverse<const MachineBasicBlock*> G) {
+ static NodeRef getEntryNode(Inverse<const MachineBasicBlock *> G) {
return G.Graph;
}
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->pred_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->pred_end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->pred_end(); }
};
Modified: llvm/trunk/include/llvm/CodeGen/MachineDominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineDominators.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineDominators.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineDominators.h Mon Aug 22 16:09:30 2016
@@ -271,15 +271,12 @@ public:
template <class Node, class ChildIterator>
struct MachineDomTreeGraphTraitsBase {
- typedef Node NodeType;
typedef Node *NodeRef;
typedef ChildIterator ChildIteratorType;
- static NodeType *getEntryNode(NodeType *N) { return N; }
- static inline ChildIteratorType child_begin(NodeType *N) {
- return N->begin();
- }
- static inline ChildIteratorType child_end(NodeType *N) { return N->end(); }
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
template <class T> struct GraphTraits;
@@ -297,7 +294,7 @@ struct GraphTraits<const MachineDomTreeN
template <> struct GraphTraits<MachineDominatorTree*>
: public GraphTraits<MachineDomTreeNode *> {
- static NodeType *getEntryNode(MachineDominatorTree *DT) {
+ static NodeRef getEntryNode(MachineDominatorTree *DT) {
return DT->getRootNode();
}
};
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Mon Aug 22 16:09:30 2016
@@ -614,9 +614,7 @@ public:
//
template <> struct GraphTraits<MachineFunction*> :
public GraphTraits<MachineBasicBlock*> {
- static NodeType *getEntryNode(MachineFunction *F) {
- return &F->front();
- }
+ static NodeRef getEntryNode(MachineFunction *F) { return &F->front(); }
// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
typedef pointer_iterator<MachineFunction::iterator> nodes_iterator;
@@ -630,9 +628,7 @@ template <> struct GraphTraits<MachineFu
};
template <> struct GraphTraits<const MachineFunction*> :
public GraphTraits<const MachineBasicBlock*> {
- static NodeType *getEntryNode(const MachineFunction *F) {
- return &F->front();
- }
+ static NodeRef getEntryNode(const MachineFunction *F) { return &F->front(); }
// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
typedef pointer_iterator<MachineFunction::const_iterator> nodes_iterator;
@@ -655,13 +651,13 @@ template <> struct GraphTraits<const Mac
//
template <> struct GraphTraits<Inverse<MachineFunction*> > :
public GraphTraits<Inverse<MachineBasicBlock*> > {
- static NodeType *getEntryNode(Inverse<MachineFunction*> G) {
+ static NodeRef getEntryNode(Inverse<MachineFunction *> G) {
return &G.Graph->front();
}
};
template <> struct GraphTraits<Inverse<const MachineFunction*> > :
public GraphTraits<Inverse<const MachineBasicBlock*> > {
- static NodeType *getEntryNode(Inverse<const MachineFunction *> G) {
+ static NodeRef getEntryNode(Inverse<const MachineFunction *> G) {
return &G.Graph->front();
}
};
Modified: llvm/trunk/include/llvm/CodeGen/MachineLoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineLoopInfo.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineLoopInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineLoopInfo.h Mon Aug 22 16:09:30 2016
@@ -162,31 +162,21 @@ public:
// Allow clients to walk the list of nested loops...
template <> struct GraphTraits<const MachineLoop*> {
- typedef const MachineLoop NodeType;
typedef const MachineLoop *NodeRef;
typedef MachineLoopInfo::iterator ChildIteratorType;
- static NodeType *getEntryNode(const MachineLoop *L) { return L; }
- static inline ChildIteratorType child_begin(NodeType *N) {
- return N->begin();
- }
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->end();
- }
+ static NodeRef getEntryNode(const MachineLoop *L) { return L; }
+ static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
template <> struct GraphTraits<MachineLoop*> {
- typedef MachineLoop NodeType;
typedef MachineLoop *NodeRef;
typedef MachineLoopInfo::iterator ChildIteratorType;
- static NodeType *getEntryNode(MachineLoop *L) { return L; }
- static inline ChildIteratorType child_begin(NodeType *N) {
- return N->begin();
- }
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->end();
- }
+ static NodeRef getEntryNode(MachineLoop *L) { return L; }
+ static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
};
} // End llvm namespace
Modified: llvm/trunk/include/llvm/CodeGen/MachineRegionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegionInfo.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineRegionInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineRegionInfo.h Mon Aug 22 16:09:30 2016
@@ -142,10 +142,11 @@ RegionGraphTraits(const MachineRegion, c
template <> struct GraphTraits<MachineRegionInfo*>
: public GraphTraits<FlatIt<MachineRegionNode*> > {
- typedef df_iterator<NodeType*, SmallPtrSet<NodeType*, 8>, false,
- GraphTraits<FlatIt<NodeType*> > > nodes_iterator;
+ typedef df_iterator<NodeRef, SmallPtrSet<NodeRef, 8>, false,
+ GraphTraits<FlatIt<NodeRef>>>
+ nodes_iterator;
- static NodeType *getEntryNode(MachineRegionInfo *RI) {
+ static NodeRef getEntryNode(MachineRegionInfo *RI) {
return GraphTraits<FlatIt<MachineRegion*> >::getEntryNode(RI->getTopLevelRegion());
}
static nodes_iterator nodes_begin(MachineRegionInfo* RI) {
@@ -158,10 +159,11 @@ template <> struct GraphTraits<MachineRe
template <> struct GraphTraits<MachineRegionInfoPass*>
: public GraphTraits<MachineRegionInfo *> {
- typedef df_iterator<NodeType*, SmallPtrSet<NodeType*, 8>, false,
- GraphTraits<FlatIt<NodeType*> > > nodes_iterator;
+ typedef df_iterator<NodeRef, SmallPtrSet<NodeRef, 8>, false,
+ GraphTraits<FlatIt<NodeRef>>>
+ nodes_iterator;
- static NodeType *getEntryNode(MachineRegionInfoPass *RI) {
+ static NodeRef getEntryNode(MachineRegionInfoPass *RI) {
return GraphTraits<MachineRegionInfo*>::getEntryNode(&RI->getRegionInfo());
}
static nodes_iterator nodes_begin(MachineRegionInfoPass* RI) {
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Aug 22 16:09:30 2016
@@ -679,14 +679,13 @@ namespace llvm {
};
template <> struct GraphTraits<SUnit*> {
- typedef SUnit NodeType;
typedef SUnit *NodeRef;
typedef SUnitIterator ChildIteratorType;
- static inline NodeType *getEntryNode(SUnit *N) { return N; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline NodeRef getEntryNode(SUnit *N) { return N; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return SUnitIterator::begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
+ static inline ChildIteratorType child_end(NodeRef N) {
return SUnitIterator::end(N);
}
};
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Mon Aug 22 16:09:30 2016
@@ -2055,14 +2055,13 @@ public:
};
template <> struct GraphTraits<SDNode*> {
- typedef SDNode NodeType;
typedef SDNode *NodeRef;
typedef SDNodeIterator ChildIteratorType;
- static inline NodeType *getEntryNode(SDNode *N) { return N; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline NodeRef getEntryNode(SDNode *N) { return N; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return SDNodeIterator::begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
+ static inline ChildIteratorType child_end(NodeRef N) {
return SDNodeIterator::end(N);
}
};
Modified: llvm/trunk/include/llvm/IR/CFG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/CFG.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/CFG.h (original)
+++ llvm/trunk/include/llvm/IR/CFG.h Mon Aug 22 16:09:30 2016
@@ -154,32 +154,26 @@ struct isPodLike<TerminatorInst::SuccIte
// graph of basic blocks...
template <> struct GraphTraits<BasicBlock*> {
- typedef BasicBlock NodeType;
typedef BasicBlock *NodeRef;
typedef succ_iterator ChildIteratorType;
- static NodeType *getEntryNode(BasicBlock *BB) { return BB; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(BasicBlock *BB) { return BB; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return succ_begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return succ_end(N);
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
};
template <> struct GraphTraits<const BasicBlock*> {
- typedef const BasicBlock NodeType;
typedef const BasicBlock *NodeRef;
typedef succ_const_iterator ChildIteratorType;
- static NodeType *getEntryNode(const BasicBlock *BB) { return BB; }
+ static NodeRef getEntryNode(const BasicBlock *BB) { return BB; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline ChildIteratorType child_begin(NodeRef N) {
return succ_begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return succ_end(N);
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
};
// Provide specializations of GraphTraits to be able to treat a function as a
@@ -188,31 +182,23 @@ template <> struct GraphTraits<const Bas
// instead of the successor edges.
//
template <> struct GraphTraits<Inverse<BasicBlock*> > {
- typedef BasicBlock NodeType;
typedef BasicBlock *NodeRef;
typedef pred_iterator ChildIteratorType;
- static NodeType *getEntryNode(Inverse<BasicBlock *> G) { return G.Graph; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(Inverse<BasicBlock *> G) { return G.Graph; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return pred_begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return pred_end(N);
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
};
template <> struct GraphTraits<Inverse<const BasicBlock*> > {
- typedef const BasicBlock NodeType;
typedef const BasicBlock *NodeRef;
typedef const_pred_iterator ChildIteratorType;
- static NodeType *getEntryNode(Inverse<const BasicBlock*> G) {
- return G.Graph;
- }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(Inverse<const BasicBlock *> G) { return G.Graph; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return pred_begin(N);
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return pred_end(N);
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
};
@@ -226,7 +212,7 @@ template <> struct GraphTraits<Inverse<c
// except that the root node is implicitly the first node of the function.
//
template <> struct GraphTraits<Function*> : public GraphTraits<BasicBlock*> {
- static NodeType *getEntryNode(Function *F) { return &F->getEntryBlock(); }
+ static NodeRef getEntryNode(Function *F) { return &F->getEntryBlock(); }
// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
typedef pointer_iterator<Function::iterator> nodes_iterator;
@@ -240,7 +226,7 @@ template <> struct GraphTraits<Function*
};
template <> struct GraphTraits<const Function*> :
public GraphTraits<const BasicBlock*> {
- static NodeType *getEntryNode(const Function *F) {return &F->getEntryBlock();}
+ static NodeRef getEntryNode(const Function *F) { return &F->getEntryBlock(); }
// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
typedef pointer_iterator<Function::const_iterator> nodes_iterator;
@@ -261,13 +247,13 @@ template <> struct GraphTraits<const Fun
//
template <> struct GraphTraits<Inverse<Function*> > :
public GraphTraits<Inverse<BasicBlock*> > {
- static NodeType *getEntryNode(Inverse<Function*> G) {
+ static NodeRef getEntryNode(Inverse<Function *> G) {
return &G.Graph->getEntryBlock();
}
};
template <> struct GraphTraits<Inverse<const Function*> > :
public GraphTraits<Inverse<const BasicBlock*> > {
- static NodeType *getEntryNode(Inverse<const Function *> G) {
+ static NodeRef getEntryNode(Inverse<const Function *> G) {
return &G.Graph->getEntryBlock();
}
};
Modified: llvm/trunk/include/llvm/IR/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Dominators.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Dominators.h (original)
+++ llvm/trunk/include/llvm/IR/Dominators.h Mon Aug 22 16:09:30 2016
@@ -155,24 +155,19 @@ public:
// iterable by generic graph iterators.
template <class Node, class ChildIterator> struct DomTreeGraphTraitsBase {
- typedef Node NodeType;
typedef Node *NodeRef;
typedef ChildIterator ChildIteratorType;
- typedef df_iterator<Node *, SmallPtrSet<NodeType *, 8>> nodes_iterator;
+ typedef df_iterator<Node *, SmallPtrSet<NodeRef, 8>> nodes_iterator;
- static NodeType *getEntryNode(NodeType *N) { return N; }
- static inline ChildIteratorType child_begin(NodeType *N) {
- return N->begin();
- }
- static inline ChildIteratorType child_end(NodeType *N) { return N->end(); }
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
- static nodes_iterator nodes_begin(NodeType *N) {
+ static nodes_iterator nodes_begin(NodeRef N) {
return df_begin(getEntryNode(N));
}
- static nodes_iterator nodes_end(NodeType *N) {
- return df_end(getEntryNode(N));
- }
+ static nodes_iterator nodes_end(NodeRef N) { return df_end(getEntryNode(N)); }
};
template <>
@@ -186,9 +181,7 @@ struct GraphTraits<const DomTreeNode *>
template <> struct GraphTraits<DominatorTree*>
: public GraphTraits<DomTreeNode*> {
- static NodeType *getEntryNode(DominatorTree *DT) {
- return DT->getRootNode();
- }
+ static NodeRef getEntryNode(DominatorTree *DT) { return DT->getRootNode(); }
static nodes_iterator nodes_begin(DominatorTree *N) {
return df_begin(getEntryNode(N));
Modified: llvm/trunk/include/llvm/IR/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Type.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Type.h (original)
+++ llvm/trunk/include/llvm/IR/Type.h Mon Aug 22 16:09:30 2016
@@ -429,29 +429,27 @@ template <> struct isa_impl<PointerType,
// graph of sub types.
template <> struct GraphTraits<Type *> {
- typedef Type NodeType;
typedef Type *NodeRef;
typedef Type::subtype_iterator ChildIteratorType;
- static inline NodeType *getEntryNode(Type *T) { return T; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline NodeRef getEntryNode(Type *T) { return T; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->subtype_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
+ static inline ChildIteratorType child_end(NodeRef N) {
return N->subtype_end();
}
};
template <> struct GraphTraits<const Type*> {
- typedef const Type NodeType;
typedef const Type *NodeRef;
typedef Type::subtype_iterator ChildIteratorType;
- static inline NodeType *getEntryNode(NodeType *T) { return T; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline NodeRef getEntryNode(NodeRef T) { return T; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->subtype_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
+ static inline ChildIteratorType child_end(NodeRef N) {
return N->subtype_end();
}
};
Modified: llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/MemorySSA.h Mon Aug 22 16:09:30 2016
@@ -876,29 +876,25 @@ inline const_memoryaccess_def_iterator M
/// \brief GraphTraits for a MemoryAccess, which walks defs in the normal case,
/// and uses in the inverse case.
template <> struct GraphTraits<MemoryAccess *> {
- using NodeType = MemoryAccess;
+ using NodeRef = MemoryAccess *;
using ChildIteratorType = memoryaccess_def_iterator;
- static NodeType *getEntryNode(NodeType *N) { return N; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->defs_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->defs_end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->defs_end(); }
};
template <> struct GraphTraits<Inverse<MemoryAccess *>> {
- using NodeType = MemoryAccess;
+ using NodeRef = MemoryAccess *;
using ChildIteratorType = MemoryAccess::iterator;
- static NodeType *getEntryNode(NodeType *N) { return N; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->user_begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->user_end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->user_end(); }
};
/// \brief Provide an iterator that walks defs, giving both the memory access,
Modified: llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/BlockFrequencyInfo.cpp Mon Aug 22 16:09:30 2016
@@ -60,20 +60,17 @@ namespace llvm {
template <>
struct GraphTraits<BlockFrequencyInfo *> {
- typedef const BasicBlock NodeType;
typedef const BasicBlock *NodeRef;
typedef succ_const_iterator ChildIteratorType;
typedef pointer_iterator<Function::const_iterator> nodes_iterator;
- static inline const NodeType *getEntryNode(const BlockFrequencyInfo *G) {
+ static inline NodeRef getEntryNode(const BlockFrequencyInfo *G) {
return &G->getFunction()->front();
}
- static ChildIteratorType child_begin(const NodeType *N) {
+ static ChildIteratorType child_begin(const NodeRef N) {
return succ_begin(N);
}
- static ChildIteratorType child_end(const NodeType *N) {
- return succ_end(N);
- }
+ static ChildIteratorType child_end(const NodeRef N) { return succ_end(N); }
static nodes_iterator nodes_begin(const BlockFrequencyInfo *G) {
return nodes_iterator(G->getFunction()->begin());
}
Modified: llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp (original)
+++ llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp Mon Aug 22 16:09:30 2016
@@ -628,15 +628,12 @@ namespace llvm {
template <> struct GraphTraits<IrreducibleGraph> {
typedef bfi_detail::IrreducibleGraph GraphT;
- typedef const GraphT::IrrNode NodeType;
typedef const GraphT::IrrNode *NodeRef;
typedef GraphT::IrrNode::iterator ChildIteratorType;
- static const NodeType *getEntryNode(const GraphT &G) {
- return G.StartIrr;
- }
- static ChildIteratorType child_begin(NodeType *N) { return N->succ_begin(); }
- static ChildIteratorType child_end(NodeType *N) { return N->succ_end(); }
+ static NodeRef getEntryNode(const GraphT &G) { return G.StartIrr; }
+ static ChildIteratorType child_begin(NodeRef N) { return N->succ_begin(); }
+ static ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
};
} // end namespace llvm
Modified: llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp Mon Aug 22 16:09:30 2016
@@ -52,23 +52,19 @@ extern cl::opt<unsigned> ViewHotFreqPerc
namespace llvm {
template <> struct GraphTraits<MachineBlockFrequencyInfo *> {
- typedef const MachineBasicBlock NodeType;
typedef const MachineBasicBlock *NodeRef;
typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
typedef pointer_iterator<MachineFunction::const_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());
Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Mon Aug 22 16:09:30 2016
@@ -332,23 +332,18 @@ struct ArgumentUsesTracker : public Capt
namespace llvm {
template <> struct GraphTraits<ArgumentGraphNode *> {
- typedef ArgumentGraphNode NodeType;
typedef ArgumentGraphNode *NodeRef;
typedef SmallVectorImpl<ArgumentGraphNode *>::iterator ChildIteratorType;
- static inline NodeType *getEntryNode(NodeType *A) { return A; }
- static inline ChildIteratorType child_begin(NodeType *N) {
+ static inline NodeRef getEntryNode(NodeRef A) { return A; }
+ static inline ChildIteratorType child_begin(NodeRef N) {
return N->Uses.begin();
}
- static inline ChildIteratorType child_end(NodeType *N) {
- return N->Uses.end();
- }
+ static inline ChildIteratorType child_end(NodeRef N) { return N->Uses.end(); }
};
template <>
struct GraphTraits<ArgumentGraph *> : public GraphTraits<ArgumentGraphNode *> {
- static NodeType *getEntryNode(ArgumentGraph *AG) {
- return AG->getEntryNode();
- }
+ static NodeRef getEntryNode(ArgumentGraph *AG) { return AG->getEntryNode(); }
static ChildIteratorType nodes_begin(ArgumentGraph *AG) {
return AG->begin();
}
Modified: llvm/trunk/unittests/ADT/SCCIteratorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SCCIteratorTest.cpp?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/SCCIteratorTest.cpp (original)
+++ llvm/trunk/unittests/ADT/SCCIteratorTest.cpp Mon Aug 22 16:09:30 2016
@@ -229,15 +229,16 @@ public:
template <unsigned N>
struct GraphTraits<Graph<N> > {
- typedef typename Graph<N>::NodeType NodeType;
typedef typename Graph<N>::NodeType *NodeRef;
typedef typename Graph<N>::ChildIterator ChildIteratorType;
- static inline NodeType *getEntryNode(const Graph<N> &G) { return G.AccessNode(0); }
- static inline ChildIteratorType child_begin(NodeType *Node) {
- return Graph<N>::child_begin(Node);
+ static inline NodeRef getEntryNode(const Graph<N> &G) {
+ return G.AccessNode(0);
+ }
+ static inline ChildIteratorType child_begin(NodeRef Node) {
+ return Graph<N>::child_begin(Node);
}
- static inline ChildIteratorType child_end(NodeType *Node) {
+ static inline ChildIteratorType child_end(NodeRef Node) {
return Graph<N>::child_end(Node);
}
};
Modified: llvm/trunk/unittests/Analysis/CallGraphTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/CallGraphTest.cpp?rev=279475&r1=279474&r2=279475&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/CallGraphTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/CallGraphTest.cpp Mon Aug 22 16:09:30 2016
@@ -17,29 +17,29 @@ using namespace llvm;
namespace {
template <typename Ty> void canSpecializeGraphTraitsIterators(Ty *G) {
- typedef typename GraphTraits<Ty *>::NodeType NodeTy;
+ typedef typename GraphTraits<Ty *>::NodeRef NodeRef;
auto I = GraphTraits<Ty *>::nodes_begin(G);
auto E = GraphTraits<Ty *>::nodes_end(G);
auto X = ++I;
// Should be able to iterate over all nodes of the graph.
- static_assert(std::is_same<decltype(*I), NodeTy *>::value,
+ static_assert(std::is_same<decltype(*I), NodeRef>::value,
"Node type does not match");
- static_assert(std::is_same<decltype(*X), NodeTy *>::value,
+ static_assert(std::is_same<decltype(*X), NodeRef>::value,
"Node type does not match");
- static_assert(std::is_same<decltype(*E), NodeTy *>::value,
+ static_assert(std::is_same<decltype(*E), NodeRef>::value,
"Node type does not match");
- NodeTy *N = GraphTraits<Ty *>::getEntryNode(G);
+ NodeRef N = GraphTraits<Ty *>::getEntryNode(G);
- auto S = GraphTraits<NodeTy *>::child_begin(N);
- auto F = GraphTraits<NodeTy *>::child_end(N);
+ auto S = GraphTraits<NodeRef>::child_begin(N);
+ auto F = GraphTraits<NodeRef>::child_end(N);
// Should be able to iterate over immediate successors of a node.
- static_assert(std::is_same<decltype(*S), NodeTy *>::value,
+ static_assert(std::is_same<decltype(*S), NodeRef>::value,
"Node type does not match");
- static_assert(std::is_same<decltype(*F), NodeTy *>::value,
+ static_assert(std::is_same<decltype(*F), NodeRef>::value,
"Node type does not match");
}
More information about the llvm-commits
mailing list