timshen created this revision. timshen added a reviewer: dblaikie. timshen added a subscriber: cfe-commits.
Corresponding LLVM change: D23522 https://reviews.llvm.org/D23523 Files: include/clang/Analysis/CFG.h include/clang/Analysis/CallGraph.h Index: include/clang/Analysis/CallGraph.h =================================================================== --- include/clang/Analysis/CallGraph.h +++ include/clang/Analysis/CallGraph.h @@ -172,6 +172,7 @@ 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<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();} Index: include/clang/Analysis/CFG.h =================================================================== --- include/clang/Analysis/CFG.h +++ include/clang/Analysis/CFG.h @@ -999,6 +999,7 @@ 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< 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<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<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)
Index: include/clang/Analysis/CallGraph.h =================================================================== --- include/clang/Analysis/CallGraph.h +++ include/clang/Analysis/CallGraph.h @@ -172,6 +172,7 @@ 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<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();} Index: include/clang/Analysis/CFG.h =================================================================== --- include/clang/Analysis/CFG.h +++ include/clang/Analysis/CFG.h @@ -999,6 +999,7 @@ 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< 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<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<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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits