summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2009-06-06 17:49:35 +0000
committerJay Foad <jay.foad@gmail.com>2009-06-06 17:49:35 +0000
commite57ba2eab58d46c55c1327983f9c2c7a69e65fce (patch)
tree16b38b10719ca667015afa892ab67d7649954caf /llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
parent800c20f11a1df646eba1e1a8e6ea4ed44f3e3ad2 (diff)
downloadbcm5719-llvm-e57ba2eab58d46c55c1327983f9c2c7a69e65fce.tar.gz
bcm5719-llvm-e57ba2eab58d46c55c1327983f9c2c7a69e65fce.zip
Use cast<> instead of dyn_cast<> for things that are known to be
Instructions. llvm-svn: 73002
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 9935f12f893..7143c7be485 100644
--- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -1228,7 +1228,8 @@ void SROA::CleanupAllocaUsers(AllocationInst *AI) {
User *U = *UI++;
if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U))
CleanupGEP(GEPI);
- else if (Instruction *I = dyn_cast<Instruction>(U)) {
+ else {
+ Instruction *I = cast<Instruction>(U);
SmallVector<DbgInfoIntrinsic *, 2> DbgInUses;
if (!isa<StoreInst>(I) && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
// Safe to remove debug info uses.
OpenPOWER on IntegriCloud