[PATCH] D52223: [dwarfdump] Verify DW_AT_type.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 08:38:52 PDT 2018


aprantl added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:192
+                         Die.getTag() == DW_TAG_variable ||
+                         Die.getTag() == DW_TAG_array_type)) {
+      error() << "DIE with tag " << TagString(Die.getTag())
----------------
Have you tested this? I have a vague recollection that older versions of clang emitted (void) as no type. You may need to add an exception for DWARF2 or something.

Found it: <rdar://problem/13291085> (For everyone else: it's a bugreport about exactly this)


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:195
+              << " is missing type attribute:\n";
+      Die.dump(OS, 0);
+      OS << '\n';
----------------
It might be nice to define an `operator<<(const Die&)` for this presumably(?) common case.


Repository:
  rL LLVM

https://reviews.llvm.org/D52223





More information about the llvm-commits mailing list