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 | 187b1924a4b68350a6492b116db0fb19c659222f (patch) | |
tree | eb19b13486576817b875321fccd8a053acd0c0fd /lib/Transforms/Utils/Local.cpp | |
parent | 5df7ef6cdbdaaa6bf3bf12b959557a44fbf250a6 (diff) |
The "landingpad" instruction will never be "trivially" dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 60dc15d642..be0aa82500 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/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)) { |