[llvm-commits] [llvm] r137483 - in /llvm/trunk: include/llvm/DerivedTypes.h lib/VMCore/Type.cpp

Chris Lattner sabre at nondot.org
Fri Aug 12 11:08:19 PDT 2011


Author: lattner
Date: Fri Aug 12 13:08:19 2011
New Revision: 137483

URL: http://llvm.org/viewvc/llvm-project?rev=137483&view=rev
Log:
add ifdef's to let people easily remove these dead api for testing.

Modified:
    llvm/trunk/include/llvm/DerivedTypes.h
    llvm/trunk/lib/VMCore/Type.cpp

Modified: llvm/trunk/include/llvm/DerivedTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DerivedTypes.h?rev=137483&r1=137482&r2=137483&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DerivedTypes.h (original)
+++ llvm/trunk/include/llvm/DerivedTypes.h Fri Aug 12 13:08:19 2011
@@ -224,7 +224,7 @@
   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,
@@ -236,7 +236,8 @@
                                  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,

Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=137483&r1=137482&r2=137483&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Fri Aug 12 13:08:19 2011
@@ -412,13 +412,6 @@
   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 @@
 }
 
 
-
+#if 1
 
 StructType *StructType::createNamed(LLVMContext &Context, StringRef Name,
                                     ArrayRef<Type*> Elements, bool isPacked) {
@@ -537,6 +530,14 @@
   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 @@
   }
   return llvm::StructType::createNamed(Ctx, Name, StructFields);
 }
+#endif
 
 StringRef StructType::getName() const {
   assert(!isLiteral() && "Literal structs never have names");





More information about the llvm-commits mailing list