[PATCH] D83211: Factor out call to EXTRACTOR in generateCC1CommandLine
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 12:53:44 PDT 2020
dang created this revision.
dang added a reviewer: Bigcheese.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
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
@@ -3927,9 +3927,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); \
}
#include "clang/Driver/Options.inc"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83211.275655.patch
Type: text/x-patch
Size: 1096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200706/6f4eb914/attachment-0001.bin>
More information about the cfe-commits
mailing list