diff options
author | Reid Kleckner <rnk@google.com> | 2016-09-02 18:43:27 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-09-02 18:43:27 +0000 |
commit | fa28396f97cc16d518f711a5c5f4bcf500e14ff2 (patch) | |
tree | b2638a7035036e8ac8401f825584d4271e797eb4 /llvm/lib/DebugInfo/CodeView | |
parent | bcdcbd11ba68649eb9c7579d7002f36907d3b9a9 (diff) | |
download | bcm5719-llvm-fa28396f97cc16d518f711a5c5f4bcf500e14ff2.tar.gz bcm5719-llvm-fa28396f97cc16d518f711a5c5f4bcf500e14ff2.zip |
[codeview] Use the correct max CV record length of 0xFF00
Previously we were splitting our records at 0xFFFF bytes, which the
Microsoft tools don't like.
Should fix failure on the new Windows self-host buildbot.
This length appears in microsoft-pdb/PDB/dbi/dbiimpl.h
llvm-svn: 280522
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/ListRecordBuilder.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/ListRecordBuilder.cpp b/llvm/lib/DebugInfo/CodeView/ListRecordBuilder.cpp index ab019c44c5b..efac32a0f86 100644 --- a/llvm/lib/DebugInfo/CodeView/ListRecordBuilder.cpp +++ b/llvm/lib/DebugInfo/CodeView/ListRecordBuilder.cpp @@ -20,7 +20,7 @@ ListRecordBuilder::ListRecordBuilder(TypeRecordKind Kind) void ListRecordBuilder::writeMemberType(const ListContinuationRecord &R) { TypeRecordBuilder &Builder = getBuilder(); - assert(getLastContinuationSize() < 65535 - 8 && "continuation won't fit"); + assert(getLastContinuationSize() < MaxRecordLength - 8 && "continuation won't fit"); Builder.writeTypeRecordKind(TypeRecordKind::ListContinuation); Builder.writeUInt16(0); @@ -48,11 +48,12 @@ void ListRecordBuilder::finishSubRecord() { // space for a continuation record (8 bytes). If the segment does not fit, // back up and insert a continuation record, sliding the current subrecord // down. - if (getLastContinuationSize() > 65535 - 8) { + if (getLastContinuationSize() > MaxRecordLength - 8) { assert(SubrecordStart != 0 && "can't slide from the start!"); SmallString<128> SubrecordCopy( Builder.str().slice(SubrecordStart, Builder.size())); - assert(SubrecordCopy.size() < 65530 && "subrecord is too large to slide!"); + assert(SubrecordCopy.size() < MaxRecordLength - 8 && + "subrecord is too large to slide!"); Builder.truncate(SubrecordStart); // Write a placeholder continuation record. @@ -61,7 +62,7 @@ void ListRecordBuilder::finishSubRecord() { Builder.writeUInt32(0); ContinuationOffsets.push_back(Builder.size()); assert(Builder.size() == SubrecordStart + 8 && "wrong continuation size"); - assert(getLastContinuationSize() < 65535 && "segment too big"); + assert(getLastContinuationSize() < MaxRecordLength && "segment too big"); // Start a new list record of the appropriate kind, and copy the previous // subrecord into place. |