diff options
author | Nilanjana Basu <nilanjana.basu87@gmail.com> | 2019-08-21 15:19:58 +0000 |
---|---|---|
committer | Nilanjana Basu <nilanjana.basu87@gmail.com> | 2019-08-21 15:19:58 +0000 |
commit | ac3851c4340aab5664da0e29a4b7d9cd966332a9 (patch) | |
tree | 718683505228f010319f845418cff2e8f66c2562 /llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp | |
parent | 78347c979e10db22c49921d2c9587be7c896171d (diff) | |
download | bcm5719-llvm-ac3851c4340aab5664da0e29a4b7d9cd966332a9.tar.gz bcm5719-llvm-ac3851c4340aab5664da0e29a4b7d9cd966332a9.zip |
Improving CodeView debug info type record's inline comments
llvm-svn: 369533
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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<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()) { |