diff options
author | Chris Lattner <sabre@nondot.org> | 2011-08-18 17:39:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-08-18 17:39:28 +0000 |
commit | 489fee1b64564540d46231c94e92fea84ed97cc5 (patch) | |
tree | 30fbbe62b31e28c6253f1b03e412bc39fd7b7b7e /lib/VMCore/Type.cpp | |
parent | 6ea80e964ba0f8a3420b10bf21172508f713fafc (diff) | |
download | llvm-489fee1b64564540d46231c94e92fea84ed97cc5.tar.gz llvm-489fee1b64564540d46231c94e92fea84ed97cc5.tar.bz2 llvm-489fee1b64564540d46231c94e92fea84ed97cc5.tar.xz |
Rip out the old StructType APIs as warned about on llvmdev last week.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r-- | lib/VMCore/Type.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index dd3450a0f7..10184bc6f0 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -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(); |