diff options
author | Chris Lattner <sabre@nondot.org> | 2011-08-12 18:08:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-08-12 18:08:19 +0000 |
commit | d95f8f6ada29d33686aca700f7f9757113d0acfa (patch) | |
tree | 77a2248d0783774f5972f47d4abff75c1bfe330d /lib | |
parent | 1bcbf8582e94eee6f151e5e2db2d04f417abf5f7 (diff) |
add ifdef's to let people easily remove these dead api for testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Type.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index decb50cd4d..dd3450a0f7 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -412,13 +412,6 @@ void StructType::setBody(ArrayRef<Type*> Elements, bool isPacked) { NumContainedTys = Elements.size(); } -StructType *StructType::createNamed(LLVMContext &Context, StringRef Name) { - StructType *ST = new (Context.pImpl->TypeAllocator) StructType(Context); - if (!Name.empty()) - ST->setName(Name); - return ST; -} - void StructType::setName(StringRef Name) { if (Name == getName()) return; @@ -528,7 +521,7 @@ StructType *StructType::create(StringRef Name, Type *type, ...) { } - +#if 1 StructType *StructType::createNamed(LLVMContext &Context, StringRef Name, ArrayRef<Type*> Elements, bool isPacked) { @@ -537,6 +530,14 @@ StructType *StructType::createNamed(LLVMContext &Context, StringRef Name, 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() && @@ -556,6 +557,7 @@ StructType *StructType::createNamed(StringRef Name, Type *type, ...) { } return llvm::StructType::createNamed(Ctx, Name, StructFields); } +#endif StringRef StructType::getName() const { assert(!isLiteral() && "Literal structs never have names"); |