[PATCH] D62004: [LLD] [MinGW] Allow requesting PDB output without giving a file name

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 12:25:55 PDT 2019


mstorsjo marked 2 inline comments as done.
mstorsjo added inline comments.


================
Comment at: MinGW/Driver.cpp:168
     Add("-debug");
-    Add("-pdb:" + StringRef(A->getValue()));
+    StringRef V = StringRef(A->getValue());
+    if (!V.empty())
----------------
dmajor wrote:
> Is the `StringRef` on the RHS necessary?
Ah right, no it isn't.


================
Comment at: MinGW/Options.td:61
 def pdb: S<"pdb">, HelpText<"Specify output PDB debug information file">;
+def pdb_eq: J<"pdb=">, Alias<pdb>;
 def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
----------------
dmajor wrote:
> Should the new behavior be advertised in the HelpText or a doc somewhere?
Hmm, yes, ideally. I don't think there's much other general usage docs for the MinGW driver, so I guess it has to be squeezed into the HelpText here. I'd document it on my page for my MinGW distribution at least, for general usage of PDBs in a MinGW context (for the combination of passing `-gcodeview` to the compiler, and this option to the linker).

Maybe `HelpText<"Specify output PDB debug information file. Defaults to the output filename, with a pdb suffix, if given an empty argument.">`? Or can you come up with a more concise way of describing it?


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D62004





More information about the llvm-commits mailing list