Change the GlobalAlias constructor to look a bit more like GlobalVariable.
[oota-llvm.git] / unittests / Transforms / Utils / SpecialCaseList.cpp
index 748834f85e0cd2dafc599b3c237900ad1330e574..6863ea5a6012f673afb19d57ffff8be2d595f6d1 100644 (file)
@@ -35,8 +35,9 @@ protected:
   }
 
   GlobalAlias *makeAlias(StringRef Name, GlobalValue *Aliasee) {
-    return new GlobalAlias(Aliasee->getType(), GlobalValue::ExternalLinkage,
-                           Name, Aliasee, Aliasee->getParent());
+    return new GlobalAlias(Aliasee->getType()->getElementType(),
+                           GlobalValue::ExternalLinkage, Name, Aliasee,
+                           Aliasee->getParent());
   }
 
   SpecialCaseList *makeSpecialCaseList(StringRef List, std::string &Error) {