Reduce abuse of default values in the GlobalAlias constructor.
[oota-llvm.git] / lib / Bitcode / Reader / BitcodeReader.cpp
index a2bb52c1e9f0d87c19f2059c1229d8d1dac08616..478103f982f539e841dac701c4ae6c7a999aedb8 100644 (file)
@@ -2004,8 +2004,8 @@ error_code BitcodeReader::ParseModule(bool Resume) {
         return Error(InvalidTypeForValue);
 
       auto *NewGA =
-          new GlobalAlias(PTy->getElementType(), GetDecodedLinkage(Record[2]),
-                          "", nullptr, TheModule, PTy->getAddressSpace());
+          new GlobalAlias(PTy->getElementType(), PTy->getAddressSpace(),
+                          GetDecodedLinkage(Record[2]), "", TheModule);
       // Old bitcode files didn't have visibility field.
       // Local linkage must have default visibility.
       if (Record.size() > 3 && !NewGA->hasLocalLinkage())