[PATCH] D36993: [llvm-dwarfdump] Print type names in DW_AT_type DIEs

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 09:26:47 PDT 2017


aprantl added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:88
+    return;
+  }
+  OS << TagStr.substr(7, TagStr.size() - 12) << " ";
----------------
remove extra braces


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:98
+
+  if (const char *Name = D.getName(DINameKind::LinkageName)) {
+    OS << Name;
----------------
In other places we condense this to:
```
if (const char *Name = D.getName(DINameKind::LinkageName))
  return OS << Name;
```
This is mostly up to personal taste though.



================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:114
+
+  // Follow the DW_AT_type if possible
+  dumpTypeName(OS, D);
----------------
`.` at the end. LLVM prefers full sentences in comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:195
+    dumpTypeName(OS, Die);
+    OS << "\"";
   } else if (Attr == DW_AT_APPLE_property_attribute) {
----------------
maybe `OS <<'"';` is more legible?


Repository:
  rL LLVM

https://reviews.llvm.org/D36993





More information about the llvm-commits mailing list