- /// GlobalAlias ctor - If a parent module is specified, the alias is
- /// automatically inserted into the end of the specified module's alias list.
- GlobalAlias(Type *Ty, LinkageTypes Linkage, const Twine &Name = "",
- Constant* Aliasee = 0, Module *Parent = 0);
+
+ /// If a parent module is specified, the alias is automatically inserted into
+ /// the end of the specified module's alias list.
+ static GlobalAlias *create(Type *Ty, unsigned AddressSpace,
+ LinkageTypes Linkage, const Twine &Name,
+ Constant *Aliasee, Module *Parent);
+
+ // Without the Aliasee.
+ static GlobalAlias *create(Type *Ty, unsigned AddressSpace,
+ LinkageTypes Linkage, const Twine &Name,
+ Module *Parent);
+
+ // The module is taken from the 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,
+ GlobalValue *Aliasee);
+
+ // Linkage, Type, Parent and AddressSpace taken from the Aliasee.
+ static GlobalAlias *create(const Twine &Name, GlobalValue *Aliasee);