diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
commit | 4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (patch) | |
tree | 9a48fa9f7f51fd635f6807ed7444fcdcad0e9bda /lib/VMCore/ConstantFold.cpp | |
parent | 0041d4d447c26825e566ba38a4fe301471fda1eb (diff) |
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 62ef25b643..81ad205c69 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -1908,7 +1908,7 @@ Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred, APInt V1 = cast<ConstantInt>(C1)->getValue(); APInt V2 = cast<ConstantInt>(C2)->getValue(); switch (pred) { - default: llvm_unreachable("Invalid ICmp Predicate"); return 0; + default: llvm_unreachable("Invalid ICmp Predicate"); case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2); case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2); case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2)); @@ -1925,7 +1925,7 @@ Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred, APFloat C2V = cast<ConstantFP>(C2)->getValueAPF(); APFloat::cmpResult R = C1V.compare(C2V); switch (pred) { - default: llvm_unreachable("Invalid FCmp Predicate"); return 0; + default: llvm_unreachable("Invalid FCmp Predicate"); case FCmpInst::FCMP_FALSE: return Constant::getNullValue(ResultTy); case FCmpInst::FCMP_TRUE: return Constant::getAllOnesValue(ResultTy); case FCmpInst::FCMP_UNO: |