[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space

Many of the callers already have the pointer type anyway, and for the
couple of callers that don't it's pretty easy to call PointerType::get
on the pointee type and address space.

This avoids LLParser from using PointerType::getElementType when parsing
GlobalAliases from IR.

llvm-svn: 236160
diff --git a/llvm/lib/ExecutionEngine/Orc/CloneSubModule.cpp b/llvm/lib/ExecutionEngine/Orc/CloneSubModule.cpp
index a3196ad..c981009 100644
--- a/llvm/lib/ExecutionEngine/Orc/CloneSubModule.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/CloneSubModule.cpp
@@ -61,9 +61,7 @@
   for (Module::const_alias_iterator I = Src.alias_begin(), E = Src.alias_end();
        I != E; ++I) {
     auto *PTy = cast<PointerType>(I->getType());
-    auto *GA =
-        GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(),
-                            I->getLinkage(), I->getName(), &Dst);
+    auto *GA = GlobalAlias::create(PTy, I->getLinkage(), I->getName(), &Dst);
     GA->copyAttributesFrom(I);
     VMap[I] = GA;
   }