Skip to content

Commit

Permalink
[ADT] Migrate DepthFirstIterator to use NodeRef
Browse files Browse the repository at this point in the history
Summary: The corresponding LLVM change is D23146.

Reviewers: dblaikie, chandlerc

Subscribers: cfe-commits

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

llvm-svn: 277783
  • Loading branch information
timshen91 committed Aug 4, 2016
1 parent 3ceac2b commit 68de2e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/include/clang/AST/StmtGraphTraits.h
Expand Up @@ -26,6 +26,7 @@ namespace llvm {

template <> struct GraphTraits<clang::Stmt*> {
typedef clang::Stmt NodeType;
typedef clang::Stmt * NodeRef;
typedef clang::Stmt::child_iterator ChildIteratorType;
typedef llvm::df_iterator<clang::Stmt*> nodes_iterator;

Expand Down Expand Up @@ -53,6 +54,7 @@ template <> struct GraphTraits<clang::Stmt*> {

template <> struct GraphTraits<const clang::Stmt*> {
typedef const clang::Stmt NodeType;
typedef const clang::Stmt * NodeRef;
typedef clang::Stmt::const_child_iterator ChildIteratorType;
typedef llvm::df_iterator<const clang::Stmt*> nodes_iterator;

Expand Down
1 change: 1 addition & 0 deletions clang/include/clang/Analysis/Analyses/Dominators.h
Expand Up @@ -168,6 +168,7 @@ class DominatorTree : public ManagedAnalysis {
namespace llvm {
template <> struct GraphTraits< ::clang::DomTreeNode* > {
typedef ::clang::DomTreeNode NodeType;
typedef ::clang::DomTreeNode *NodeRef;
typedef NodeType::iterator ChildIteratorType;

static NodeType *getEntryNode(NodeType *N) {
Expand Down
Expand Up @@ -451,6 +451,7 @@ class ExplodedNodeSet {
namespace llvm {
template<> struct GraphTraits<clang::ento::ExplodedNode*> {
typedef clang::ento::ExplodedNode NodeType;
typedef clang::ento::ExplodedNode *NodeRef;
typedef NodeType::succ_iterator ChildIteratorType;
typedef llvm::df_iterator<NodeType*> nodes_iterator;

Expand All @@ -477,6 +478,7 @@ namespace llvm {

template<> struct GraphTraits<const clang::ento::ExplodedNode*> {
typedef const clang::ento::ExplodedNode NodeType;
typedef const clang::ento::ExplodedNode *NodeRef;
typedef NodeType::const_succ_iterator ChildIteratorType;
typedef llvm::df_iterator<NodeType*> nodes_iterator;

Expand Down

0 comments on commit 68de2e9

Please sign in to comment.