summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CallGraph.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2016-12-12 14:12:10 +0000
committerHaojian Wu <hokein@google.com>2016-12-12 14:12:10 +0000
commit053499841a6d9561446de5b52db62a481b73f9a9 (patch)
treebd7c4de1eb199eebb71e8b695e36d98f41db34c4 /clang/lib/Analysis/CallGraph.cpp
parent4cbe1834e4e07aeed6142d4ccd7cf007bf3b9efe (diff)
downloadbcm5719-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.cpp4
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();
}
OpenPOWER on IntegriCloud