[PATCH] Set a debugger "target" to guide DWARF choices

Paul Robinson Paul_Robinson at playstation.sony.com
Thu Jun 25 11:17:51 PDT 2015

Comment at: include/llvm/CodeGen/CommandFlags.h:236
@@ +235,3 @@
+               cl::desc("Tune debug info for a particular debugger"),
dblaikie wrote:
> What's the command line argument for? I mean convenience of testing LLVM, a bit, but in general we don't want to use backend options like this when actually interacting with LLVM from Clang and other frontends. This should probably end up as a part of the CU debug info metadata? Or a module-level debug info metadata flag? (ala DWARF version)
The command line option is precisely for testing; it is not how Clang communicates to LLVM.
CommandFlags.h exists to define command-line options for the tools (llc, opt etc) only.  It does not define a command-line option that is accessible to Clang.
Clang will set the TargetOptions field directly.

Comment at: test/DebugInfo/X86/dwarf-public-names.ll:42
@@ -41,3 +41,3 @@
 ; NOPUB: debug_pubnames
-; NOPUB: {{^$}}
+; NOPUB-NEXT: {{^$}}
dblaikie wrote:
> what happened to these two checks in this test?
As originally written, this check does not fail if there is actually a debug_pubnames section, because it didn't insist that the empty line was immediately following the "debug_pubnames" header line.  Instead it would match the empty line at the end of the debug_pubnames dump, and pass.
I made the same change on the LINUX path just for consistency.

This test update could actually be committed independently if you'd rather, as it's fixing a bug in the test rather than actually testing something I did in the rest of the patch.



More information about the llvm-commits mailing list