summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/CodeView/CodeViewRecordIO.cpp')
-rw-r--r--lib/DebugInfo/CodeView/CodeViewRecordIO.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp b/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
index 2f49474115a1..36a384baa13d 100644
--- a/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
+++ b/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
@@ -20,7 +20,6 @@ Error CodeViewRecordIO::beginRecord(Optional<uint32_t> MaxLength) {
Limit.MaxLength = MaxLength;
Limit.BeginOffset = getCurrentOffset();
Limits.push_back(Limit);
- resetStreamedLen();
return Error::success();
}
@@ -50,6 +49,7 @@ Error CodeViewRecordIO::endRecord() {
Streamer->EmitBytes(BytesSR);
--PaddingBytes;
}
+ resetStreamedLen();
}
return Error::success();
}
@@ -126,7 +126,11 @@ Error CodeViewRecordIO::mapByteVectorTail(std::vector<uint8_t> &Bytes,
Error CodeViewRecordIO::mapInteger(TypeIndex &TypeInd, const Twine &Comment) {
if (isStreaming()) {
- emitComment(Comment);
+ std::string TypeNameStr = Streamer->getTypeName(TypeInd);
+ if (!TypeNameStr.empty())
+ emitComment(Comment + ": " + TypeNameStr);
+ else
+ emitComment(Comment);
Streamer->EmitIntValue(TypeInd.getIndex(), sizeof(TypeInd.getIndex()));
incrStreamedLen(sizeof(TypeInd.getIndex()));
} else if (isWriting()) {