De-constify Types in StructType::get() and TargetData::getIntPtrType().
[oota-llvm.git] / lib / VMCore / Type.cpp
index 40d232a619fc841d47ad8ec35f611240a17585ce..10467a8d90088e0dcbc84ee7ae7736ea1e426d6f 100644 (file)
@@ -458,22 +458,15 @@ void StructType::setName(StringRef Name) {
 //===----------------------------------------------------------------------===//
 // StructType Helper functions.
 
-// FIXME: Remove this version.
-StructType *StructType::get(LLVMContext &Context, ArrayRef<const Type*>Elements,
-                            bool isPacked) {
-  return get(Context, ArrayRef<Type*>(const_cast<Type**>(Elements.data()),
-             Elements.size()), isPacked);
-}
-
 StructType *StructType::get(LLVMContext &Context, bool isPacked) {
-  return get(Context, llvm::ArrayRef<const Type*>(), isPacked);
+  return get(Context, llvm::ArrayRef<Type*>(), isPacked);
 }
 
-StructType *StructType::get(const Type *type, ...) {
+StructType *StructType::get(Type *type, ...) {
   assert(type != 0 && "Cannot create a struct type with no elements with this");
   LLVMContext &Ctx = type->getContext();
   va_list ap;
-  SmallVector<const llvm::Type*, 8> StructFields;
+  SmallVector<llvm::Type*, 8> StructFields;
   va_start(ap, type);
   while (type) {
     StructFields.push_back(type);