Pass const vectors by reference.

llvm-svn: 47577
This commit is contained in:
Devang Patel 2008-02-26 00:12:13 +00:00
parent c1fb49b19f
commit 5b3d61f5ed
2 changed files with 8 additions and 8 deletions

View File

@ -1381,7 +1381,7 @@ public:
class ReturnInst : public TerminatorInst {
ReturnInst(const ReturnInst &RI);
void init(Value *RetVal);
void init(std::vector<Value *> &RetVals);
void init(const std::vector<Value *> &RetVals);
public:
// ReturnInst constructors:
@ -1397,9 +1397,9 @@ public:
// if it was passed NULL.
explicit ReturnInst(Value *retVal = 0, Instruction *InsertBefore = 0);
ReturnInst(Value *retVal, BasicBlock *InsertAtEnd);
ReturnInst(std::vector<Value *> &retVals);
ReturnInst(std::vector<Value *> &retVals, Instruction *InsertBefore);
ReturnInst(std::vector<Value *> &retVals, BasicBlock *InsertAtEnd);
ReturnInst(const std::vector<Value *> &retVals);
ReturnInst(const std::vector<Value *> &retVals, Instruction *InsertBefore);
ReturnInst(const std::vector<Value *> &retVals, BasicBlock *InsertAtEnd);
explicit ReturnInst(BasicBlock *InsertAtEnd);
virtual ~ReturnInst();

View File

@ -592,15 +592,15 @@ ReturnInst::ReturnInst(BasicBlock *InsertAtEnd)
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, 0, InsertAtEnd) {
}
ReturnInst::ReturnInst(std::vector<Value *> &retVals, Instruction *InsertBefore)
ReturnInst::ReturnInst(const std::vector<Value *> &retVals, Instruction *InsertBefore)
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size(), InsertBefore) {
init(retVals);
}
ReturnInst::ReturnInst(std::vector<Value *> &retVals, BasicBlock *InsertAtEnd)
ReturnInst::ReturnInst(const std::vector<Value *> &retVals, BasicBlock *InsertAtEnd)
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size(), InsertAtEnd) {
init(retVals);
}
ReturnInst::ReturnInst(std::vector<Value *> &retVals)
ReturnInst::ReturnInst(const std::vector<Value *> &retVals)
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size()) {
init(retVals);
}
@ -615,7 +615,7 @@ void ReturnInst::init(Value *retVal) {
}
}
void ReturnInst::init(std::vector<Value *> &retVals) {
void ReturnInst::init(const std::vector<Value *> &retVals) {
if (retVals.empty())
return;