summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp12
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";
}
OpenPOWER on IntegriCloud