summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-03-22 01:49:30 +0000
committerJuergen Ributzka <juergen@apple.com>2014-03-22 01:49:30 +0000
commite474752f4cc76c49079328b6ce6c16abb02a4a57 (patch)
treec9c898b18aba1c6947fd86fc38c6fdb09f921f13 /llvm/lib
parente802d507b0c11492b3116a77354493fb873856ce (diff)
downloadbcm5719-llvm-e474752f4cc76c49079328b6ce6c16abb02a4a57.tar.gz
bcm5719-llvm-e474752f4cc76c49079328b6ce6c16abb02a4a57.zip
[Constant Hoisting] Erase dead cast instructions.
The cleanup code that removes dead cast instructions only removed them from the basic block, but didn't delete them. This fix erases them now too. llvm-svn: 204538
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/ConstantHoisting.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp b/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
index ce2e7eb6bf2..cd0801d1efa 100644
--- a/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
@@ -595,7 +595,7 @@ bool ConstantHoisting::emitBaseConstants() {
void ConstantHoisting::deleteDeadCastInst() const {
for (auto const &I : ClonedCastMap)
if (I.first->use_empty())
- I.first->removeFromParent();
+ I.first->eraseFromParent();
}
/// \brief Optimize expensive integer constants in the given function.
OpenPOWER on IntegriCloud