summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDie.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDie.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
index 654d205aa96..35567d0f67a 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -244,15 +244,17 @@ static void dumpAttribute(raw_ostream &OS, const DWARFDie &Die,
else
formValue.dump(OS, DumpOpts);
+ std::string Space = DumpOpts.ShowAddresses ? " " : "";
+
// We have dumped the attribute raw value. For some attributes
// having both the raw value and the pretty-printed value is
// interesting. These attributes are handled below.
if (Attr == DW_AT_specification || Attr == DW_AT_abstract_origin) {
if (const char *Name = Die.getAttributeValueAsReferencedDie(Attr).getName(
DINameKind::LinkageName))
- OS << " \"" << Name << '\"';
+ OS << Space << "\"" << Name << '\"';
} else if (Attr == DW_AT_type) {
- OS << " \"";
+ OS << Space << "\"";
dumpTypeName(OS, Die);
OS << '"';
} else if (Attr == DW_AT_APPLE_property_attribute) {
OpenPOWER on IntegriCloud