AsmWriter/Bitcode: MDGlobalVariable

llvm-svn: 229020
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-13 01:35:40 +00:00
parent 2847f3805e
commit c8f810a017
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);