[opaque pointer types] Add an explicit value type to GlobalObject
[oota-llvm.git] / lib / IR / Globals.cpp
index 28f223593a86487fa7a050eb9ddd8533197d132c..11ece2ed1b19c2f38a3cd1f6c01efb7790b10a8d 100644 (file)
@@ -234,8 +234,8 @@ void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) {
 GlobalAlias::GlobalAlias(Type *Ty, unsigned AddressSpace, LinkageTypes Link,
                          const Twine &Name, Constant *Aliasee,
                          Module *ParentModule)
-    : GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalAliasVal,
-                  &Op<0>(), 1, Link, Name) {
+    : GlobalValue(Ty, Value::GlobalAliasVal, &Op<0>(), 1, Link, Name,
+                  AddressSpace) {
   Op<0>() = Aliasee;
 
   if (ParentModule)