revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.

llvm-svn: 125504
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index cac37cb..42c6076 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -94,7 +94,7 @@
     return ConstantInt::get(Ty->getContext(),
                             APInt::getAllOnesValue(ITy->getBitWidth()));
   
-  SmallVector<Constant*, 16> Elts;
+  std::vector<Constant*> Elts;
   const VectorType *VTy = cast<VectorType>(Ty);
   Elts.resize(VTy->getNumElements(), getAllOnesValue(VTy->getElementType()));
   assert(Elts[0] && "Not a vector integer type!");
@@ -302,8 +302,8 @@
 
   // For vectors, broadcast the value.
   if (const VectorType *VTy = dyn_cast<VectorType>(Ty))
-    return ConstantVector::get(SmallVector<Constant*,
-                                           16>(VTy->getNumElements(), C));
+    return ConstantVector::get(
+      std::vector<Constant *>(VTy->getNumElements(), C));
 
   return C;
 }
@@ -329,7 +329,7 @@
   // For vectors, broadcast the value.
   if (const VectorType *VTy = dyn_cast<VectorType>(Ty))
     return ConstantVector::get(
-      SmallVector<Constant *, 16>(VTy->getNumElements(), C));
+      std::vector<Constant *>(VTy->getNumElements(), C));
 
   return C;
 }
@@ -372,7 +372,7 @@
   // For vectors, broadcast the value.
   if (const VectorType *VTy = dyn_cast<VectorType>(Ty))
     return ConstantVector::get(
-      SmallVector<Constant *, 16>(VTy->getNumElements(), C));
+      std::vector<Constant *>(VTy->getNumElements(), C));
 
   return C;
 }
@@ -387,7 +387,7 @@
   // For vectors, broadcast the value.
   if (const VectorType *VTy = dyn_cast<VectorType>(Ty))
     return ConstantVector::get(
-      SmallVector<Constant *, 16>(VTy->getNumElements(), C));
+      std::vector<Constant *>(VTy->getNumElements(), C));
 
   return C; 
 }
@@ -404,9 +404,9 @@
 Constant *ConstantFP::getZeroValueForNegation(const Type* Ty) {
   if (const VectorType *PTy = dyn_cast<VectorType>(Ty))
     if (PTy->getElementType()->isFloatingPointTy()) {
-      SmallVector<Constant*, 16> zeros(PTy->getNumElements(),
+      std::vector<Constant*> zeros(PTy->getNumElements(),
                            getNegativeZero(PTy->getElementType()));
-      return ConstantVector::get(zeros);
+      return ConstantVector::get(PTy, zeros);
     }
 
   if (Ty->isFloatingPointTy()) 
@@ -601,12 +601,13 @@
 }
 
 // ConstantVector accessors.
-Constant *ConstantVector::get(const VectorType *T,
-                              const std::vector<Constant*> &V) {
+Constant *ConstantVector::get(const VectorType* T,
+                              const std::vector<Constant*>& V) {
   assert(!V.empty() && "Vectors can't be empty");
-  LLVMContextImpl *pImpl = T->getContext().pImpl;
+  LLVMContext &Context = T->getContext();
+  LLVMContextImpl *pImpl = Context.pImpl;
 
-  // If this is an all-undef or all-zero vector, return a
+  // If this is an all-undef or alll-zero vector, return a
   // ConstantAggregateZero or UndefValue.
   Constant *C = V[0];
   bool isZero = C->isNullValue();
@@ -628,10 +629,14 @@
   return pImpl->VectorConstants.getOrCreate(T, V);
 }
 
-Constant *ConstantVector::get(ArrayRef<Constant*> V) {
+Constant *ConstantVector::get(const std::vector<Constant*>& V) {
+  assert(!V.empty() && "Cannot infer type if V is empty");
+  return get(VectorType::get(V.front()->getType(),V.size()), V);
+}
+
+Constant *ConstantVector::get(Constant *const* Vals, unsigned NumVals) {
   // FIXME: make this the primary ctor method.
-  assert(!V.empty() && "Vectors cannot be empty");
-  return get(VectorType::get(V.front()->getType(), V.size()), V.vec());
+  return get(std::vector<Constant*>(Vals, Vals+NumVals));
 }
 
 // Utility function for determining if a ConstantExpr is a CastOp or not. This