summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Statepoint.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2014-12-04 17:27:58 +0000
committerPhilip Reames <listmail@philipreames.com>2014-12-04 17:27:58 +0000
commiteafafa37bcc43f981b8ba9c9398422f694ee1a8e (patch)
tree7126768ecefdb489efab9e928855f7a0db011f4b /llvm/lib/IR/Statepoint.cpp
parentf226aaf42e8fd043d93d2615235afd859159a69f (diff)
downloadbcm5719-llvm-eafafa37bcc43f981b8ba9c9398422f694ee1a8e.tar.gz
bcm5719-llvm-eafafa37bcc43f981b8ba9c9398422f694ee1a8e.zip
Fix a typo: use of cast where dyn_cast was intended
This bug has the effect of converting a test of isGCRelocate(InvokeInst*) from a false return to a crash. This may be the root cause of the crash Joerg reported against r223137, but I'm still waiting for a clean build of clang to complete to be able to confirm. Once I've confirmed the issue, I'll submit a test case separately. llvm-svn: 223370
Diffstat (limited to 'llvm/lib/IR/Statepoint.cpp')
-rw-r--r--llvm/lib/IR/Statepoint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Statepoint.cpp b/llvm/lib/IR/Statepoint.cpp
index 8096913b01e..a04f6738dcb 100644
--- a/llvm/lib/IR/Statepoint.cpp
+++ b/llvm/lib/IR/Statepoint.cpp
@@ -51,7 +51,7 @@ bool llvm::isGCResult(const ImmutableCallSite &CS) {
return isGCResult(CS.getInstruction());
}
bool llvm::isGCResult(const Instruction *inst) {
- if (const CallInst *call = cast<CallInst>(inst)) {
+ if (const CallInst *call = dyn_cast<CallInst>(inst)) {
if (Function *F = call->getCalledFunction()) {
return (F->getIntrinsicID() == Intrinsic::experimental_gc_result_int ||
F->getIntrinsicID() == Intrinsic::experimental_gc_result_float ||
OpenPOWER on IntegriCloud