diff options
author | Haojian Wu <hokein@google.com> | 2016-12-12 14:12:10 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2016-12-12 14:12:10 +0000 |
commit | 053499841a6d9561446de5b52db62a481b73f9a9 (patch) | |
tree | bd7c4de1eb199eebb71e8b695e36d98f41db34c4 /clang/lib/Analysis/CallGraph.cpp | |
parent | 4cbe1834e4e07aeed6142d4ccd7cf007bf3b9efe (diff) | |
download | bcm5719-llvm-053499841a6d9561446de5b52db62a481b73f9a9.tar.gz bcm5719-llvm-053499841a6d9561446de5b52db62a481b73f9a9.zip |
[StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.
Summary:
Remove the CallGraph in addCallee as it is not used in addCallee.
It decouples addCallee from CallGraph, so that we can use CallGraphNode
within our customized CallGraph.
Reviewers: bkramer
Subscribers: cfe-commits, ioeric
Differential Revision: https://reviews.llvm.org/D27674
llvm-svn: 289431
Diffstat (limited to 'clang/lib/Analysis/CallGraph.cpp')
-rw-r--r-- | clang/lib/Analysis/CallGraph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp index 0cb5a3fe14e..8c126b09d05 100644 --- a/clang/lib/Analysis/CallGraph.cpp +++ b/clang/lib/Analysis/CallGraph.cpp @@ -55,7 +55,7 @@ public: void addCalledDecl(Decl *D) { if (G->includeInGraph(D)) { CallGraphNode *CalleeNode = G->getOrInsertNode(D); - CallerNode->addCallee(CalleeNode, G); + CallerNode->addCallee(CalleeNode); } } @@ -154,7 +154,7 @@ CallGraphNode *CallGraph::getOrInsertNode(Decl *F) { Node = llvm::make_unique<CallGraphNode>(F); // Make Root node a parent of all functions to make sure all are reachable. if (F) - Root->addCallee(Node.get(), this); + Root->addCallee(Node.get()); return Node.get(); } |