[PATCH] D62462: [llvm-objdump] Add warning messages if disassembly + source for problematic inputs

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 03:10:10 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/DIContext.h:32
+static const StringRef kDILineInfoBadString("<invalid>");
+static const StringRef kBadString("??");
+
----------------
grimar wrote:
> Variable names should start from the upper case (LLVM coding style).
Just to add, the 'k' really isn't a useful part of the name. We don't use that style of variable naming.

Also, I don't think you need to define them in the header. You just need to add a declaration with `extern`.


================
Comment at: llvm/test/tools/llvm-objdump/X86/source-interleave-no-debug-info.test:12
 
+# WARN:        warning: failed to parse debug info from file <invalid>
 # CHECK:       0000000000000010 main:
----------------
Hmm... Not sure about this one. I think we need a different message in that case, since '<invalid>' isn't actually a file.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:525
+  bool WarnedNoDebugInfo;
+
 
----------------
Unnecessary extra blank line


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62462/new/

https://reviews.llvm.org/D62462





More information about the llvm-commits mailing list