diff options
Diffstat (limited to 'lib/Transforms/Scalar/ScalarReplAggregates.cpp')
-rw-r--r-- | lib/Transforms/Scalar/ScalarReplAggregates.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 9935f12..7143c7b 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/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. |