Rip out the old StructType APIs as warned about on llvmdev last week.
authorChris Lattner <sabre@nondot.org>
Thu, 18 Aug 2011 17:39:28 +0000 (17:39 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Aug 2011 17:39:28 +0000 (17:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137953 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DerivedTypes.h
lib/VMCore/Type.cpp

index f28c3747a1bfd1e630a2bc0d2cc1e6cdd3f52294..445c3deb7ce205dc8b21a2a45796fa5e63f2a446 100644 (file)
@@ -224,20 +224,6 @@ public:
   static StructType *create(LLVMContext &Context, ArrayRef<Type*> Elements);
   static StructType *create(StringRef Name, Type *elt1, ...) END_WITH_NULL;
 
-#if 1
-  // FIXME: Remove these.
-  bool isAnonymous() const {return (getSubclassData() & SCDB_IsLiteral) != 0;}
-  static StructType *createNamed(LLVMContext &Context,
-                                 StringRef Name);
-  
-  static StructType *createNamed(StringRef Name, ArrayRef<Type*> Elements,
-                                 bool isPacked = false);
-  static StructType *createNamed(LLVMContext &Context, StringRef Name,
-                                 ArrayRef<Type*> Elements,
-                                 bool isPacked = false);
-  static StructType *createNamed(StringRef Name, Type *elt1, ...) END_WITH_NULL;
-#endif
-  
   /// StructType::get - This static method is the primary way to create a
   /// literal StructType.
   static StructType *get(LLVMContext &Context, ArrayRef<Type*> Elements,
index dd3450a0f7b957b611234e7d881b22c68831d258..10184bc6f0e3a79719869d3db86c15c7ef10af77 100644 (file)
@@ -521,44 +521,6 @@ StructType *StructType::create(StringRef Name, Type *type, ...) {
 }
 
 
-#if 1
-
-StructType *StructType::createNamed(LLVMContext &Context, StringRef Name,
-                                    ArrayRef<Type*> Elements, bool isPacked) {
-  StructType *ST = createNamed(Context, Name);
-  ST->setBody(Elements, isPacked);
-  return ST;
-}
-
-StructType *StructType::createNamed(LLVMContext &Context, StringRef Name) {
-  StructType *ST = new (Context.pImpl->TypeAllocator) StructType(Context);
-  if (!Name.empty())
-    ST->setName(Name);
-  return ST;
-}
-
-
-StructType *StructType::createNamed(StringRef Name, ArrayRef<Type*> Elements,
-                                    bool isPacked) {
-  assert(!Elements.empty() &&
-         "This method may not be invoked with an empty list");
-  return createNamed(Elements[0]->getContext(), Name, Elements, isPacked);
-}
-
-StructType *StructType::createNamed(StringRef Name, Type *type, ...) {
-  assert(type != 0 && "Cannot create a struct type with no elements with this");
-  LLVMContext &Ctx = type->getContext();
-  va_list ap;
-  SmallVector<llvm::Type*, 8> StructFields;
-  va_start(ap, type);
-  while (type) {
-    StructFields.push_back(type);
-    type = va_arg(ap, llvm::Type*);
-  }
-  return llvm::StructType::createNamed(Ctx, Name, StructFields);
-}
-#endif
-
 StringRef StructType::getName() const {
   assert(!isLiteral() && "Literal structs never have names");
   if (SymbolTableEntry == 0) return StringRef();