Reduce abuse of default values in the GlobalAlias constructor.

This is in preparation for adding an optional offset.

llvm-svn: 209073
This commit is contained in:
Rafael Espindola
2014-05-17 19:57:46 +00:00
parent e8daa2f843
commit 8370565820
11 changed files with 52 additions and 28 deletions

View 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())