diff options
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 88c6f18c6e..47ef1c9174 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -216,13 +216,12 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) { if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I)) { if (DDI->getAddress()) return false; - else - return true; - } else if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(I)) { + return true; + } + if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(I)) { if (DVI->getValue()) return false; - else - return true; + return true; } if (!I->mayHaveSideEffects()) return true; |