AsmWriter/Bitcode: MDCompileUnit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-13 01:25:10 +00:00
parent bcaafc81ab
commit 37742c3591
10 changed files with 177 additions and 9 deletions

View File

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