Skip to content

Commit a58b1c9

Browse files
author
Devang Patel
committed
Remove unncessary ReturnInst constructors.
llvm-svn: 47633
1 parent d6bd311 commit a58b1c9

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

llvm/include/llvm/Instructions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,9 +1397,6 @@ class ReturnInst : public TerminatorInst {
13971397
// if it was passed NULL.
13981398
explicit ReturnInst(Value *retVal = 0, Instruction *InsertBefore = 0);
13991399
ReturnInst(Value *retVal, BasicBlock *InsertAtEnd);
1400-
ReturnInst(const std::vector<Value *> &retVals);
1401-
ReturnInst(const std::vector<Value *> &retVals, Instruction *InsertBefore);
1402-
ReturnInst(const std::vector<Value *> &retVals, BasicBlock *InsertAtEnd);
14031400
ReturnInst(Value * const* retVals, unsigned N);
14041401
ReturnInst(Value * const* retVals, unsigned N, Instruction *InsertBefore);
14051402
ReturnInst(Value * const* retVals, unsigned N, BasicBlock *InsertAtEnd);

llvm/lib/AsmParser/llvmAsmParser.y

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2580,7 +2580,9 @@ InstructionList : InstructionList Inst {
25802580

25812581
BBTerminatorInst :
25822582
RET ReturnedVal { // Return with a result...
2583-
$$ = new ReturnInst(*$2);
2583+
ValueList &VL = *$2;
2584+
if (!VL.empty())
2585+
$$ = new ReturnInst(&VL[0], VL.size());
25842586
delete $2;
25852587
CHECK_FOR_ERROR
25862588
}

llvm/lib/VMCore/Instructions.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -598,26 +598,6 @@ ReturnInst::ReturnInst(BasicBlock *InsertAtEnd)
598598
: TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, 0, InsertAtEnd) {
599599
}
600600

601-
ReturnInst::ReturnInst(const std::vector<Value *> &retVals,
602-
Instruction *InsertBefore)
603-
: TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, retVals.size(),
604-
InsertBefore) {
605-
if (!retVals.empty())
606-
init(&retVals[0], retVals.size());
607-
}
608-
ReturnInst::ReturnInst(const std::vector<Value *> &retVals,
609-
BasicBlock *InsertAtEnd)
610-
: TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, retVals.size(),
611-
InsertAtEnd) {
612-
if (!retVals.empty())
613-
init(&retVals[0], retVals.size());
614-
}
615-
ReturnInst::ReturnInst(const std::vector<Value *> &retVals)
616-
: TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, retVals.size()) {
617-
if (!retVals.empty())
618-
init(&retVals[0], retVals.size());
619-
}
620-
621601
ReturnInst::ReturnInst(Value * const* retVals, unsigned N,
622602
Instruction *InsertBefore)
623603
: TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, N, InsertBefore) {

0 commit comments

Comments
 (0)