From ac3851c4340aab5664da0e29a4b7d9cd966332a9 Mon Sep 17 00:00:00 2001 From: Nilanjana Basu Date: Wed, 21 Aug 2019 15:19:58 +0000 Subject: Improving CodeView debug info type record's inline comments llvm-svn: 369533 --- llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp') diff --git a/llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp b/llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp index 092099bb0a1..36a384baa13 100644 --- a/llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp +++ b/llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp @@ -126,7 +126,11 @@ Error CodeViewRecordIO::mapByteVectorTail(std::vector &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()) { -- cgit v1.2.3