[PDB/CodeView] Read/write codeview inlinee line information.

Previously we wrote line information and file checksum
information, but we did not write information about inlinee
lines and functions.  This patch adds support for that.

llvm-svn: 301936
This commit is contained in:
Zachary Turner
2017-05-02 16:56:09 +00:00
parent bb34f278a2
commit edef14510e
24 changed files with 506 additions and 66 deletions

View File

@@ -68,7 +68,10 @@ void ModuleDebugFileChecksumFragment::addChecksum(uint32_t StringTableOffset,
// This maps the offset of this string in the string table to the offset
// of this checksum entry in the checksum buffer.
OffsetMap[StringTableOffset] = SerializedSize;
SerializedSize += sizeof(FileChecksumEntryHeader) + Bytes.size();
assert(SerializedSize % 4 == 0);
uint32_t Len = alignTo(sizeof(FileChecksumEntryHeader) + Bytes.size(), 4);
SerializedSize += Len;
}
uint32_t ModuleDebugFileChecksumFragment::calculateSerializedLength() {
@@ -85,6 +88,8 @@ Error ModuleDebugFileChecksumFragment::commit(BinaryStreamWriter &Writer) {
return EC;
if (auto EC = Writer.writeArray(makeArrayRef(FC.Checksum)))
return EC;
if (auto EC = Writer.padToAlignment(4))
return EC;
}
return Error::success();
}