summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 71daf79a04d..6caa0275c7d 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -2321,7 +2321,11 @@ bool Attributor::checkForAllCallSites(const function_ref<bool(CallSite)> &Pred,
}
for (const Use &U : AssociatedFunction->uses()) {
- Instruction *I = cast<Instruction>(U.getUser());
+ Instruction *I = dyn_cast<Instruction>(U.getUser());
+ // TODO: Deal with abstract call sites here.
+ if (!I)
+ return false;
+
Function *Caller = I->getFunction();
const auto &LivenessAA =
OpenPOWER on IntegriCloud