aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-21 22:04:45 +0000
committerDevang Patel <dpatel@apple.com>2011-03-21 22:04:45 +0000
commitb99462117ebd4be41788346246d7935fc90a11ee (patch)
tree70e1a7473eb09dabe58ad0925f8ddb63d43a5462 /lib/Transforms/Utils/Local.cpp
parent1f7bc701b030f5b01553f306cc975eeac1e4d99b (diff)
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp9
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;