mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
Pass const vectors by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47577 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
faa999565f
commit
aaeb60ae40
@ -1381,7 +1381,7 @@ public:
|
|||||||
class ReturnInst : public TerminatorInst {
|
class ReturnInst : public TerminatorInst {
|
||||||
ReturnInst(const ReturnInst &RI);
|
ReturnInst(const ReturnInst &RI);
|
||||||
void init(Value *RetVal);
|
void init(Value *RetVal);
|
||||||
void init(std::vector<Value *> &RetVals);
|
void init(const std::vector<Value *> &RetVals);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// ReturnInst constructors:
|
// ReturnInst constructors:
|
||||||
@ -1397,9 +1397,9 @@ public:
|
|||||||
// if it was passed NULL.
|
// if it was passed NULL.
|
||||||
explicit ReturnInst(Value *retVal = 0, Instruction *InsertBefore = 0);
|
explicit ReturnInst(Value *retVal = 0, Instruction *InsertBefore = 0);
|
||||||
ReturnInst(Value *retVal, BasicBlock *InsertAtEnd);
|
ReturnInst(Value *retVal, BasicBlock *InsertAtEnd);
|
||||||
ReturnInst(std::vector<Value *> &retVals);
|
ReturnInst(const std::vector<Value *> &retVals);
|
||||||
ReturnInst(std::vector<Value *> &retVals, Instruction *InsertBefore);
|
ReturnInst(const std::vector<Value *> &retVals, Instruction *InsertBefore);
|
||||||
ReturnInst(std::vector<Value *> &retVals, BasicBlock *InsertAtEnd);
|
ReturnInst(const std::vector<Value *> &retVals, BasicBlock *InsertAtEnd);
|
||||||
explicit ReturnInst(BasicBlock *InsertAtEnd);
|
explicit ReturnInst(BasicBlock *InsertAtEnd);
|
||||||
virtual ~ReturnInst();
|
virtual ~ReturnInst();
|
||||||
|
|
||||||
|
@ -592,15 +592,15 @@ ReturnInst::ReturnInst(BasicBlock *InsertAtEnd)
|
|||||||
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, 0, 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) {
|
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size(), InsertBefore) {
|
||||||
init(retVals);
|
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) {
|
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size(), InsertAtEnd) {
|
||||||
init(retVals);
|
init(retVals);
|
||||||
}
|
}
|
||||||
ReturnInst::ReturnInst(std::vector<Value *> &retVals)
|
ReturnInst::ReturnInst(const std::vector<Value *> &retVals)
|
||||||
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size()) {
|
: TerminatorInst(Type::VoidTy, Instruction::Ret, OperandList, retVals.size()) {
|
||||||
init(retVals);
|
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())
|
if (retVals.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user