diff options
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp index 2e7a54aeb85..5140244dee9 100644 --- a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp +++ b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp @@ -86,7 +86,17 @@ void DWARFDebugInfoEntryMinimal::dumpAttribute(raw_ostream &OS, return; OS << "\t("; - formValue.dump(OS, u); + + const char *Name = nullptr; + if (Optional<uint64_t> Val = formValue.getAsUnsignedConstant()) + Name = AttributeValueString(attr, *Val); + + if (Name) { + OS << Name; + } else { + formValue.dump(OS, u); + } + OS << ")\n"; } |