From 701fd548a0b547fee0434442a510c31b065c00cf Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Mon, 15 Aug 2016 21:27:56 +0000 Subject: [PATCH] [ADT] Change PostOrderIterator to use NodeRef. NFC. Summary: Corresponding LLVM change: D23522 Reviewers: dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23523 llvm-svn: 278746 --- clang/include/clang/Analysis/CFG.h | 4 ++++ clang/include/clang/Analysis/CallGraph.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/clang/include/clang/Analysis/CFG.h b/clang/include/clang/Analysis/CFG.h index 293990c88e703..02fbf37e9f773 100644 --- a/clang/include/clang/Analysis/CFG.h +++ b/clang/include/clang/Analysis/CFG.h @@ -999,6 +999,7 @@ template <> struct simplify_type< ::clang::CFGTerminator> { 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::CFGBlock *> { 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 ::clang::CFGBlock *> { template <> struct GraphTraits > { 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 > { template <> struct GraphTraits > { typedef const ::clang::CFGBlock NodeType; + typedef const ::clang::CFGBlock *NodeRef; typedef ::clang::CFGBlock::const_pred_iterator ChildIteratorType; static NodeType *getEntryNode(Inverse G) diff --git a/clang/include/clang/Analysis/CallGraph.h b/clang/include/clang/Analysis/CallGraph.h index eda22a57e8a50..241ecd54d30b9 100644 --- a/clang/include/clang/Analysis/CallGraph.h +++ b/clang/include/clang/Analysis/CallGraph.h @@ -172,6 +172,7 @@ class CallGraphNode { namespace llvm { template <> struct GraphTraits { typedef clang::CallGraphNode NodeType; + typedef clang::CallGraphNode *NodeRef; typedef clang::CallGraphNode::CallRecord CallRecordTy; typedef std::pointer_to_unary_function CGNDerefFun; @@ -190,6 +191,7 @@ template <> struct GraphTraits { template <> struct GraphTraits { 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();}