diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-15 20:10:51 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-15 20:10:51 +0000 |
commit | d9fb470758d0943e8c8de4b37827dc8cf7bb4ddf (patch) | |
tree | cc05f0d5c77dd4ec5d2cd7c2de29db5764c49b59 /llvm/lib/Transforms | |
parent | 61a3ece665faaa0bc42b1a8bfaf2fe07d6ad4a0e (diff) | |
download | bcm5719-llvm-d9fb470758d0943e8c8de4b37827dc8cf7bb4ddf.tar.gz bcm5719-llvm-d9fb470758d0943e8c8de4b37827dc8cf7bb4ddf.zip |
The "landingpad" instruction will never be "trivially" dead.
llvm-svn: 137642
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 60dc15d6425..be0aa825001 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -226,6 +226,10 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions) { bool llvm::isInstructionTriviallyDead(Instruction *I) { if (!I->use_empty() || isa<TerminatorInst>(I)) return false; + // We don't want the landingpad instruction removed by anything this general. + if (isa<LandingPadInst>(I)) + return false; + // We don't want debug info removed by anything this general, unless // debug info is empty. if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I)) { |