aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Instructions.h8
-rw-r--r--lib/VMCore/Instructions.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 2ac311a..c9329db 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -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();
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index d1df30b..9a84b54 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -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;