Honour aliases visibility when reading from/writing to bitcode
llvm-svn: 48248
This commit is contained in:
@@ -1075,7 +1075,7 @@ bool BitcodeReader::ParseModule(const std::string &ModuleID) {
|
||||
FunctionsWithBodies.push_back(Func);
|
||||
break;
|
||||
}
|
||||
// ALIAS: [alias type, aliasee val#, linkage]
|
||||
// ALIAS: [alias type, aliasee val#, linkage, visibility]
|
||||
case bitc::MODULE_CODE_ALIAS: {
|
||||
if (Record.size() < 3)
|
||||
return Error("Invalid MODULE_ALIAS record");
|
||||
@@ -1085,6 +1085,7 @@ bool BitcodeReader::ParseModule(const std::string &ModuleID) {
|
||||
|
||||
GlobalAlias *NewGA = new GlobalAlias(Ty, GetDecodedLinkage(Record[2]),
|
||||
"", 0, TheModule);
|
||||
NewGA->setVisibility(GetDecodedVisibility(Record[3]));
|
||||
ValueList.push_back(NewGA);
|
||||
AliasInits.push_back(std::make_pair(NewGA, Record[1]));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user