aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-20 21:51:11 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-20 21:51:11 +0000
commit4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (patch)
tree9a48fa9f7f51fd635f6807ed7444fcdcad0e9bda /lib/VMCore/Instructions.cpp
parent0041d4d447c26825e566ba38a4fe301471fda1eb (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/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 4784f0c6e0..8c375c2af3 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -625,7 +625,6 @@ void ReturnInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
BasicBlock *ReturnInst::getSuccessorV(unsigned idx) const {
llvm_unreachable("ReturnInst has no successors!");
- return 0;
}
ReturnInst::~ReturnInst() {
@@ -655,7 +654,6 @@ void UnwindInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
BasicBlock *UnwindInst::getSuccessorV(unsigned idx) const {
llvm_unreachable("UnwindInst has no successors!");
- return 0;
}
//===----------------------------------------------------------------------===//
@@ -690,7 +688,6 @@ void ResumeInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
BasicBlock *ResumeInst::getSuccessorV(unsigned idx) const {
llvm_unreachable("ResumeInst has no successors!");
- return 0;
}
//===----------------------------------------------------------------------===//
@@ -717,7 +714,6 @@ void UnreachableInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
BasicBlock *UnreachableInst::getSuccessorV(unsigned idx) const {
llvm_unreachable("UnwindInst has no successors!");
- return 0;
}
//===----------------------------------------------------------------------===//
@@ -2273,7 +2269,6 @@ unsigned CastInst::isEliminableCastPair(
assert(0 && "Error in CastResults table!!!");
return 0;
}
- return 0;
}
CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
@@ -2295,8 +2290,8 @@ CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
case BitCast: return new BitCastInst (S, Ty, Name, InsertBefore);
default:
assert(0 && "Invalid opcode provided");
+ return 0;
}
- return 0;
}
CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
@@ -2318,8 +2313,8 @@ CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
case BitCast: return new BitCastInst (S, Ty, Name, InsertAtEnd);
default:
assert(0 && "Invalid opcode provided");
+ return 0;
}
- return 0;
}
CastInst *CastInst::CreateZExtOrBitCast(Value *S, Type *Ty,