aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CallGraph.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-07-17 07:36:20 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-07-17 07:36:20 +0000
commit7f66bd28b5e9016f2f6f4ddc52e083352f90ed11 (patch)
treeb2798ed5b7fc6d9d923bac7993515bb1d66cbb8e /lib/Analysis/CallGraph.cpp
parenta00425414e8c209cabc25d1826b200aeb94259af (diff)
As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CallGraph.cpp')
-rw-r--r--lib/Analysis/CallGraph.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Analysis/CallGraph.cpp b/lib/Analysis/CallGraph.cpp
index d49e8ec11b..2ec6d2014d 100644
--- a/lib/Analysis/CallGraph.cpp
+++ b/lib/Analysis/CallGraph.cpp
@@ -69,7 +69,10 @@ void CGBuilder::VisitCallExpr(CallExpr *CE) {
if (FunctionDecl *CalleeDecl = CE->getDirectCallee()) {
Entity *Ent = Entity::get(CalleeDecl, G.getProgram());
CallGraphNode *CalleeNode = G.getOrInsertFunction(Ent);
- CallerNode->addCallee(ASTLocation(FD, CE), CalleeNode);
+
+ Decl *Parent = ASTLocation::FindImmediateParent(FD, CE);
+
+ CallerNode->addCallee(ASTLocation(Parent, CE), CalleeNode);
}
}