Merging r259886 and r259888:
[oota-llvm.git] / include / llvm / IR / GlobalAlias.h
index 2316749584c6849c65e661d0a04dc1ca7003346a..b0772143309f6f70098bc1f9aff435d7affb36ba 100644 (file)
 namespace llvm {
 
 class Module;
-template<typename ValueSubClass, typename ItemParentClass>
-  class SymbolTableListTraits;
+template <typename ValueSubClass> class SymbolTableListTraits;
 
 class GlobalAlias : public GlobalValue, public ilist_node<GlobalAlias> {
-  friend class SymbolTableListTraits<GlobalAlias, Module>;
+  friend class SymbolTableListTraits<GlobalAlias>;
   void operator=(const GlobalAlias &) = delete;
   GlobalAlias(const GlobalAlias &) = delete;
 
   void setParent(Module *parent);
 
-  GlobalAlias(PointerType *Ty, LinkageTypes Linkage, const Twine &Name,
-              Constant *Aliasee, Module *Parent);
+  GlobalAlias(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage,
+              const Twine &Name, Constant *Aliasee, Module *Parent);
 
 public:
   // allocate space for exactly one operand
@@ -44,17 +43,19 @@ public:
 
   /// If a parent module is specified, the alias is automatically inserted into
   /// the end of the specified module's alias list.
-  static GlobalAlias *create(PointerType *Ty, LinkageTypes Linkage,
-                             const Twine &Name, Constant *Aliasee,
-                             Module *Parent);
+  static GlobalAlias *create(Type *Ty, unsigned AddressSpace,
+                             LinkageTypes Linkage, const Twine &Name,
+                             Constant *Aliasee, Module *Parent);
 
   // Without the Aliasee.
-  static GlobalAlias *create(PointerType *Ty, LinkageTypes Linkage,
-                             const Twine &Name, Module *Parent);
+  static GlobalAlias *create(Type *Ty, unsigned AddressSpace,
+                             LinkageTypes Linkage, const Twine &Name,
+                             Module *Parent);
 
   // The module is taken from the Aliasee.
-  static GlobalAlias *create(PointerType *Ty, LinkageTypes Linkage,
-                             const Twine &Name, GlobalValue *Aliasee);
+  static GlobalAlias *create(Type *Ty, unsigned AddressSpace,
+                             LinkageTypes Linkage, const Twine &Name,
+                             GlobalValue *Aliasee);
 
   // Type, Parent and AddressSpace taken from the Aliasee.
   static GlobalAlias *create(LinkageTypes Linkage, const Twine &Name,
@@ -118,6 +119,6 @@ struct OperandTraits<GlobalAlias> :
 
 DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalAlias, Constant)
 
-} // namespace llvm
+} // End llvm namespace
 
 #endif