summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LazyCallGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/LazyCallGraph.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp
index 08d6e76ea03..c832dc94877 100644
--- a/llvm/lib/Analysis/LazyCallGraph.cpp
+++ b/llvm/lib/Analysis/LazyCallGraph.cpp
@@ -100,12 +100,14 @@ LazyCallGraph::EdgeSequence &LazyCallGraph::Node::populateSlow() {
for (BasicBlock &BB : *F)
for (Instruction &I : BB) {
if (auto CS = CallSite(&I))
- if (Function *Callee = CS.getCalledFunction())
+ for (Function *Callee : CS.getKnownCallees())
if (!Callee->isDeclaration())
if (Callees.insert(Callee).second) {
Visited.insert(Callee);
+ auto EdgeK = CS.getCalledFunction() ? LazyCallGraph::Edge::Call
+ : LazyCallGraph::Edge::Ref;
addEdge(Edges->Edges, Edges->EdgeIndexMap, G->get(*Callee),
- LazyCallGraph::Edge::Call);
+ EdgeK);
}
for (Value *Op : I.operand_values())
OpenPOWER on IntegriCloud