[PATCH] D83211: Factor out call to EXTRACTOR in generateCC1CommandLine
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 8 09:37:07 PDT 2020
dang updated this revision to Diff 276466.
dang added a comment.
Rebase on top of latest changes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83211/new/
https://reviews.llvm.org/D83211
Files:
clang/lib/Frontend/CompilerInvocation.cpp
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -3934,9 +3934,10 @@
PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR, VALUES, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
TYPE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX) \
- if (((FLAGS)&options::CC1Option) && \
- (ALWAYS_EMIT || EXTRACTOR(this->KEYPATH) != DEFAULT_VALUE)) { \
- DENORMALIZER(Args, SPELLING, SA, TABLE_INDEX, EXTRACTOR(this->KEYPATH)); \
+ if ((FLAGS)&options::CC1Option) { \
+ const auto &Extracted = EXTRACTOR(this->KEYPATH); \
+ if (ALWAYS_EMIT || Extracted != DEFAULT_VALUE) \
+ DENORMALIZER(Args, SPELLING, SA, TABLE_INDEX, Extracted); \
}
#define OPTION_WITH_MARSHALLING_BOOLEAN( \
@@ -3944,10 +3945,10 @@
HELPTEXT, METAVAR, VALUES, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, \
TYPE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX, NEG_ID, \
NEG_SPELLING) \
- if (((FLAGS)&options::CC1Option) && \
- (ALWAYS_EMIT || EXTRACTOR(this->KEYPATH) != DEFAULT_VALUE)) { \
- DENORMALIZER(Args, SPELLING, NEG_SPELLING, SA, TABLE_INDEX, \
- EXTRACTOR(this->KEYPATH)); \
+ if ((FLAGS)&options::CC1Option) { \
+ const auto &Extracted = EXTRACTOR(this->KEYPATH); \
+ if (ALWAYS_EMIT || Extracted != DEFAULT_VALUE) \
+ DENORMALIZER(Args, SPELLING, NEG_SPELLING, SA, TABLE_INDEX, Extracted); \
}
#include "clang/Driver/Options.inc"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83211.276466.patch
Type: text/x-patch
Size: 2111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200708/354493cd/attachment.bin>
More information about the cfe-commits
mailing list