aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Steensgaard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/Steensgaard.cpp')
-rw-r--r--lib/Analysis/DataStructure/Steensgaard.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp
index b166ff1ec3..d7a4948205 100644
--- a/lib/Analysis/DataStructure/Steensgaard.cpp
+++ b/lib/Analysis/DataStructure/Steensgaard.cpp
@@ -163,8 +163,12 @@ bool Steens::run(Module &M) {
DSCallSite &CurCall = Calls[i];
// Loop over the called functions, eliminating as many as possible...
- std::vector<GlobalValue*> CallTargets =
- CurCall.getCallee().getNode()->getGlobals();
+ std::vector<GlobalValue*> CallTargets;
+ if (CurCall.isDirectCall())
+ CallTargets.push_back(CurCall.getCalleeFunc());
+ else
+ CallTargets = CurCall.getCalleeNode()->getGlobals();
+
for (unsigned c = 0; c != CallTargets.size(); ) {
// If we can eliminate this function call, do so!
bool Eliminated = false;