[DebugInfo] Added support for Checksum debug info feature.

Differential Revision: https://reviews.llvm.org/D27642

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Amjad Aboud
2016-12-25 10:12:09 +00:00
parent 43bc0ecc82
commit 4e2e80b609
16 changed files with 163 additions and 40 deletions

View File

@@ -815,13 +815,17 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
}
case bitc::METADATA_FILE: {
if (Record.size() != 3)
if (Record.size() != 3 && Record.size() != 5)
return error("Invalid record");
IsDistinct = Record[0];
MetadataList.assignValue(
GET_OR_DISTINCT(
DIFile, (Context, getMDString(Record[1]), getMDString(Record[2]))),
DIFile,
(Context, getMDString(Record[1]), getMDString(Record[2]),
Record.size() == 3 ? DIFile::CSK_None
: static_cast<DIFile::ChecksumKind>(Record[3]),
Record.size() == 3 ? nullptr : getMDString(Record[4]))),
NextMetadataNo++);
break;
}