aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-03-03 21:26:39 +0000
committerDale Johannesen <dalej@apple.com>2009-03-03 21:26:39 +0000
commit4945c657848523410a449280c6b88ee1f507511f (patch)
tree7d4289d59f99c38cd21ebd66d4ac7365872be18f /lib/Transforms/Utils/BasicBlockUtils.cpp
parent44e3dd1672572df28e79649c86f2d44bf3730062 (diff)
When removing a store to an alloca that has only one
use, check also for the case where it has two uses, the other being a llvm.dbg.declare. This is needed so debug info doesn't affect codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp
index 5f9a8b5c42..2887bdc46b 100644
--- a/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -540,8 +540,7 @@ void llvm::CopyPrecedingStopPoint(Instruction *I,
if (I != I->getParent()->begin()) {
BasicBlock::iterator BBI = I; --BBI;
if (DbgStopPointInst *DSPI = dyn_cast<DbgStopPointInst>(BBI)) {
- DbgStopPointInst *newDSPI =
- reinterpret_cast<DbgStopPointInst*>(DSPI->clone());
+ CallInst *newDSPI = DSPI->clone();
newDSPI->insertBefore(InsertPos);
}
}