AsmWriter/Bitcode: MDSubprogram

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

View File

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