r278746 - [ADT] Change PostOrderIterator to use NodeRef. NFC.

Tim Shen via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 15 14:27:57 PDT 2016


Author: timshen
Date: Mon Aug 15 16:27:56 2016
New Revision: 278746

URL: http://llvm.org/viewvc/llvm-project?rev=278746&view=rev
Log:
[ADT] Change PostOrderIterator to use NodeRef. NFC.

Summary: Corresponding LLVM change: D23522

Reviewers: dblaikie

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D23523

Modified:
    cfe/trunk/include/clang/Analysis/CFG.h
    cfe/trunk/include/clang/Analysis/CallGraph.h

Modified: cfe/trunk/include/clang/Analysis/CFG.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/CFG.h?rev=278746&r1=278745&r2=278746&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/CFG.h (original)
+++ cfe/trunk/include/clang/Analysis/CFG.h Mon Aug 15 16:27:56 2016
@@ -999,6 +999,7 @@ template <> struct simplify_type< ::clan
 
 template <> struct GraphTraits< ::clang::CFGBlock *> {
   typedef ::clang::CFGBlock NodeType;
+  typedef ::clang::CFGBlock *NodeRef;
   typedef ::clang::CFGBlock::succ_iterator ChildIteratorType;
 
   static NodeType* getEntryNode(::clang::CFGBlock *BB)
@@ -1013,6 +1014,7 @@ template <> struct GraphTraits< ::clang:
 
 template <> struct GraphTraits< const ::clang::CFGBlock *> {
   typedef const ::clang::CFGBlock NodeType;
+  typedef const ::clang::CFGBlock *NodeRef;
   typedef ::clang::CFGBlock::const_succ_iterator ChildIteratorType;
 
   static NodeType* getEntryNode(const clang::CFGBlock *BB)
@@ -1027,6 +1029,7 @@ template <> struct GraphTraits< const ::
 
 template <> struct GraphTraits<Inverse< ::clang::CFGBlock*> > {
   typedef ::clang::CFGBlock NodeType;
+  typedef ::clang::CFGBlock *NodeRef;
   typedef ::clang::CFGBlock::const_pred_iterator ChildIteratorType;
 
   static NodeType *getEntryNode(Inverse< ::clang::CFGBlock*> G)
@@ -1041,6 +1044,7 @@ template <> struct GraphTraits<Inverse<
 
 template <> struct GraphTraits<Inverse<const ::clang::CFGBlock*> > {
   typedef const ::clang::CFGBlock NodeType;
+  typedef const ::clang::CFGBlock *NodeRef;
   typedef ::clang::CFGBlock::const_pred_iterator ChildIteratorType;
 
   static NodeType *getEntryNode(Inverse<const ::clang::CFGBlock*> G)

Modified: cfe/trunk/include/clang/Analysis/CallGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/CallGraph.h?rev=278746&r1=278745&r2=278746&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/CallGraph.h (original)
+++ cfe/trunk/include/clang/Analysis/CallGraph.h Mon Aug 15 16:27:56 2016
@@ -172,6 +172,7 @@ public:
 namespace llvm {
 template <> struct GraphTraits<clang::CallGraphNode*> {
   typedef clang::CallGraphNode NodeType;
+  typedef clang::CallGraphNode *NodeRef;
   typedef clang::CallGraphNode::CallRecord CallRecordTy;
   typedef std::pointer_to_unary_function<CallRecordTy,
                                          clang::CallGraphNode*> CGNDerefFun;
@@ -190,6 +191,7 @@ template <> struct GraphTraits<clang::Ca
 
 template <> struct GraphTraits<const clang::CallGraphNode*> {
   typedef const clang::CallGraphNode NodeType;
+  typedef const clang::CallGraphNode *NodeRef;
   typedef NodeType::const_iterator ChildIteratorType;
   static NodeType *getEntryNode(const clang::CallGraphNode *CGN) { return CGN; }
   static inline ChildIteratorType child_begin(NodeType *N) { return N->begin();}




More information about the cfe-commits mailing list