[PATCH] D79796: Sketch support for generating CC1 command line from CompilerInvocation
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 26 07:00:47 PDT 2020
dang marked 5 inline comments as done.
dang added inline comments.
================
Comment at: clang/include/clang/Frontend/CompilerInvocation.h:156
/// \param [out] Res - The resulting invocation.
+ /// \param [in] CommandLineArgs - Array of argument strings, this should not
+ /// contain "-cc1".
----------------
Bigcheese wrote:
> Is this really a should not, or is it must not?
You're right updated the wording to be more accurate
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3607
+ VALUES, KEYPATH, IS_POSITIVE, DEFAULT_VALUE) \
+ if (Option::KIND##Class == Option::FlagClass) \
+ Res.KEYPATH = Args.hasArg(OPT_##ID) && IS_POSITIVE;
----------------
Bigcheese wrote:
> How would this handle other option classes? I think it would be good to include a few different types of options in the first patch.
I updated the patch to handle options that take a value. This doesn't show how to handle everything yet (it is missing how to handle options that take multiple values notably) although there are not that many of them (a quick skim of the code seems to indicate there are less than 100)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79796/new/
https://reviews.llvm.org/D79796
More information about the cfe-commits
mailing list