[PATCH] D32707: lldb-dwarfdump -verify [-quiet]

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 14:51:36 PDT 2017


clayborg added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:290
+  if (DumpType == DIDT_All || DumpType == DIDT_Info) {
+    OS << "Verifying .debug_info...\n";
+    for (const auto &CU : compile_units()) {
----------------
I can make it work. Can I do that in the next patch that will add the next level of functionality?


================
Comment at: tools/llvm-dwarfdump/llvm-dwarfdump.cpp:130
   if (auto *Obj = dyn_cast<ObjectFile>(BinOrErr->get()))
     DumpObjectFile(*Obj, Filename);
   else if (auto *Fat = dyn_cast<MachOUniversalBinary>(BinOrErr->get()))
----------------
There are two calls to DumpObjectFile here, see the call below. Do we want to duplicate the twine below twice? Seems cleaner to do it the way it is currently done? The top loop uses std::for_each to we can't get the return value so we have to use a global anyway.


https://reviews.llvm.org/D32707





More information about the llvm-commits mailing list