Add comment.
[oota-llvm.git] / lib / VMCore / Instructions.cpp
index ffd93dbc6227d9146d41c8b6252264031eae5b7b..c0b3413da33782870832f11d011181ba3ab69485 100644 (file)
@@ -598,28 +598,25 @@ ReturnInst::ReturnInst(BasicBlock *InsertAtEnd)
   : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, 0, InsertAtEnd) {
 }
 
-ReturnInst::ReturnInst(const std::vector<Value *> &retVals, 
+ReturnInst::ReturnInst(Value * const* retVals, unsigned N,
                        Instruction *InsertBefore)
-  : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, retVals.size(), 
-                   InsertBefore) {
-  if (!retVals.empty())
-    init(&retVals[0], retVals.size());
+  : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, N, InsertBefore) {
+  if (N != 0)
+    init(retVals, N);
 }
-ReturnInst::ReturnInst(const std::vector<Value *> &retVals, 
+ReturnInst::ReturnInst(Value * const* retVals, unsigned N,
                        BasicBlock *InsertAtEnd)
-  : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, retVals.size(), 
-                   InsertAtEnd) {
-  if (!retVals.empty())
-    init(&retVals[0], retVals.size());
+  : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, N, InsertAtEnd) {
+  if (N != 0)
+    init(retVals, N);
 }
-ReturnInst::ReturnInst(const std::vector<Value *> &retVals)
-  : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, retVals.size()) {
-  if (!retVals.empty())
-    init(&retVals[0], retVals.size());
+ReturnInst::ReturnInst(Value * const* retVals, unsigned N)
+  : TerminatorInst(Type::VoidTy, Instruction::Ret, &RetVal, N) {
+  if (N != 0)
+    init(retVals, N);
 }
 
 void ReturnInst::init(Value * const* retVals, unsigned N) {
-
   assert (N > 0 && "Invalid operands numbers in ReturnInst init");
 
   NumOperands = N;