[PATCH] D80833: [CodeView] Add full repro to LF_BUILDINFO record
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 07:41:41 PDT 2020
hans added inline comments.
================
Comment at: clang/include/clang/Basic/CodeGenOptions.h:320
+ /// Executable and command-line used to create a given CompilerInvocation.
+ const char *BuildTool = nullptr;
+ ArrayRef<const char *> CommandLineArgs;
----------------
The name BuildTool makes me think of things like Make or MSBuild rather than the compiler. And in this case we know the compiler is Clang :-) Also since this is for capturing the cc1 arguments, it shouldn't really matter if it's clang-cl, clang++ or just clang. So it seems unfortunate that it has to be piped through all the way like this..
Is there some way we could just grab the path to the current clang binary during the pdb writing?
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:835
+static std::string renderCommandLine(ArrayRef<const char *> CommandLineArgs,
+ StringRef MainFile) {
+ std::string FlatCmdLine;
----------------
Don't we already have code somewhere that can do this quoting? E.g. the code that prints the cc1 args for "clang -v"?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80833/new/
https://reviews.llvm.org/D80833
More information about the cfe-commits
mailing list