AsmWriter/Bitcode: MDGlobalVariable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-13 01:35:40 +00:00
parent 8921bbca59
commit fbc547da81
8 changed files with 127 additions and 10 deletions

View File

@ -1525,6 +1525,20 @@ std::error_code BitcodeReader::ParseMetadata() {
NextMDValueNo++);
break;
}
case bitc::METADATA_GLOBAL_VAR: {
if (Record.size() != 11)
return Error("Invalid record");
MDValueList.AssignValue(
GET_OR_DISTINCT(MDGlobalVariable, Record[0],
(Context, getMDOrNull(Record[1]),
getMDString(Record[2]), getMDString(Record[3]),
getMDOrNull(Record[4]), Record[5],
getMDOrNull(Record[6]), Record[7], Record[8],
getMDOrNull(Record[9]), getMDOrNull(Record[10]))),
NextMDValueNo++);
break;
}
case bitc::METADATA_STRING: {
std::string String(Record.begin(), Record.end());
llvm::UpgradeMDStringConstant(String);