Rename END_WITH_NULL to LLVM_END_WITH_NULL and move to Compiler.h
authorReid Kleckner <reid@kleckner.net>
Tue, 4 Nov 2014 01:12:21 +0000 (01:12 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 4 Nov 2014 01:12:21 +0000 (01:12 +0000)
We shouldn't put this kind of attribute stuff in DataTypes.h.

Leave the END_WITH_NULL name for now so I can update clang without
making build spam.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221215 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Constants.h
include/llvm/IR/DerivedTypes.h
include/llvm/IR/Module.h
include/llvm/Support/CommandLine.h
include/llvm/Support/Compiler.h
include/llvm/Support/DataTypes.h.cmake
include/llvm/Support/DataTypes.h.in

index 4823be000903fa46687352d56c182b47e394c9c9..1b0e1b7e7b7777563cc786e39ba66ff16d51cab7 100644 (file)
@@ -386,7 +386,7 @@ protected:
 public:
   // ConstantStruct accessors
   static Constant *get(StructType *T, ArrayRef<Constant*> V);
-  static Constant *get(StructType *T, ...) END_WITH_NULL;
+  static Constant *get(StructType *T, ...) LLVM_END_WITH_NULL;
 
   /// getAnon - Return an anonymous struct that has the specified
   /// elements.  If the struct is possibly empty, then you must specify a
index bad3beba4936be6d57021a8a0f394c7c040a2fda..534d1e54160c60ff3212b1e3c16815264312bad3 100644 (file)
@@ -218,7 +218,7 @@ public:
                             StringRef Name,
                             bool isPacked = false);
   static StructType *create(LLVMContext &Context, ArrayRef<Type*> Elements);
-  static StructType *create(StringRef Name, Type *elt1, ...) END_WITH_NULL;
+  static StructType *create(StringRef Name, Type *elt1, ...) LLVM_END_WITH_NULL;
 
   /// StructType::get - This static method is the primary way to create a
   /// literal StructType.
@@ -233,7 +233,7 @@ public:
   /// structure types by specifying the elements as arguments.  Note that this
   /// method always returns a non-packed struct, and requires at least one
   /// element type.
-  static StructType *get(Type *elt1, ...) END_WITH_NULL;
+  static StructType *get(Type *elt1, ...) LLVM_END_WITH_NULL;
 
   bool isPacked() const { return (getSubclassData() & SCDB_Packed) != 0; }
   
@@ -263,7 +263,7 @@ public:
 
   /// setBody - Specify a body for an opaque identified type.
   void setBody(ArrayRef<Type*> Elements, bool isPacked = false);
-  void setBody(Type *elt1, ...) END_WITH_NULL;
+  void setBody(Type *elt1, ...) LLVM_END_WITH_NULL;
   
   /// isValidElementType - Return true if the specified type is valid as a
   /// element type.
index 70f474951539deef12e818281800d11372f20b01..8bf67a3efea4819aa9f944dcafa276577f8b39f2 100644 (file)
@@ -352,11 +352,11 @@ public:
   /// function arguments, which makes it easier for clients to use.
   Constant *getOrInsertFunction(StringRef Name,
                                 AttributeSet AttributeList,
-                                Type *RetTy, ...)  END_WITH_NULL;
+                                Type *RetTy, ...) LLVM_END_WITH_NULL;
 
   /// Same as above, but without the attributes.
   Constant *getOrInsertFunction(StringRef Name, Type *RetTy, ...)
-    END_WITH_NULL;
+    LLVM_END_WITH_NULL;
 
   /// Look up the specified function in the module symbol table. If it does not
   /// exist, return null.
index 751a3c8bce9ede3322422404427f693fa502cd39..2b5c9c52979ca085c598ab05e4470b1348d5f0c2 100644 (file)
@@ -513,9 +513,9 @@ public:
   }
 };
 
-template<class DataType>
-ValuesClass<DataType> END_WITH_NULL values(const char *Arg, DataType Val,
-                                           const char *Desc, ...) {
+template <class DataType>
+ValuesClass<DataType> LLVM_END_WITH_NULL
+values(const char *Arg, DataType Val, const char *Desc, ...) {
     va_list ValueArgs;
     va_start(ValueArgs, Desc);
     ValuesClass<DataType> Vals(Arg, Val, Desc, ValueArgs);
index 8a86ebdbf3aa76de96d80b2d21d25c656475c74d..19308f6f0a44ee5757cb6f8d5c486a722b5db1ee 100644 (file)
 #define LLVM_LIBRARY_VISIBILITY
 #endif
 
+#if __has_attribute(sentinel) || LLVM_GNUC_PREREQ(3, 0, 0)
+#define END_WITH_NULL __attribute__((sentinel))
+#define LLVM_END_WITH_NULL __attribute__((sentinel))
+#else
+#define END_WITH_NULL
+#define LLVM_END_WITH_NULL
+#endif
+
 #if __has_attribute(used) || LLVM_GNUC_PREREQ(3, 1, 0)
 #define LLVM_ATTRIBUTE_USED __attribute__((__used__))
 #else
index c0152451d95c362047d78f136aeb20c3f1b48283..c90bf51afaeef176a902129f40673b0ac5aeb97a 100644 (file)
@@ -123,12 +123,6 @@ typedef signed int ssize_t;
 # define UINT64_MAX 0xffffffffffffffffULL
 #endif
 
-#if __GNUC__ > 3
-#define END_WITH_NULL __attribute__((sentinel))
-#else
-#define END_WITH_NULL
-#endif
-
 #ifndef HUGE_VALF
 #define HUGE_VALF (float)HUGE_VAL
 #endif
index 09cfcdf3b56b3b5f2957fb2f5a081379c06a2c9a..b8b2ba56ff30dbd0ed02ed6638a2c88a2c0e6df3 100644 (file)
@@ -116,12 +116,6 @@ typedef signed int ssize_t;
 # define UINT64_MAX 0xffffffffffffffffULL
 #endif
 
-#if __GNUC__ > 3
-#define END_WITH_NULL __attribute__((sentinel))
-#else
-#define END_WITH_NULL
-#endif
-
 #ifndef HUGE_VALF
 #define HUGE_VALF (float)HUGE_VAL
 #endif