API changes for class Use size reduction, wave 1.
[oota-llvm.git] / include / llvm / GlobalVariable.h
index d7337984793ce9a6c66b7836a8f79c5bd9928c59..8c6d8030c6dc2f8380b94a9b4acdeb56a6d2f370 100644 (file)
@@ -32,6 +32,7 @@ template<typename ValueSubClass, typename ItemParentClass>
 
 class GlobalVariable : public GlobalValue {
   friend class SymbolTableListTraits<GlobalVariable, Module>;
+  void *operator new(size_t, unsigned);       // Do not implement
   void operator=(const GlobalVariable &);     // Do not implement
   GlobalVariable(const GlobalVariable &);     // Do not implement
 
@@ -46,6 +47,10 @@ class GlobalVariable : public GlobalValue {
   Use Initializer;
 
 public:
+  // allocate space for exactly zero operands
+  void *operator new(size_t s) {
+    return User::operator new(s, 0);
+  }
   /// GlobalVariable ctor - If a parent module is specified, the global is
   /// automatically inserted into the end of the specified modules global list.
   GlobalVariable(const Type *Ty, bool isConstant, LinkageTypes Linkage,