[DebugInfo] Added support for Checksum debug info feature.

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

llvm-svn: 290514
This commit is contained in:
Amjad Aboud
2016-12-25 10:12:09 +00:00
parent 5dc0bba4e4
commit 7faeecc8f7
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;
}