[PATCH] D92857: [clang][cli] Don't always emit -f[no-]experimental-new-pass-manager
Jan Svoboda via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 09:18:12 PST 2020
jansvoboda11 created this revision.
jansvoboda11 added reviewers: dexonsmith, Bigcheese.
jansvoboda11 requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
We don't need to always generate `-f[no-]experimental-new-pass-manager`.
This patch does not change the behavior of any other command line flag. (For example `-triple` is still being always generated.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92857
Files:
clang/unittests/Frontend/CompilerInvocationTest.cpp
llvm/include/llvm/Option/OptParser.td
Index: llvm/include/llvm/Option/OptParser.td
===================================================================
--- llvm/include/llvm/Option/OptParser.td
+++ llvm/include/llvm/Option/OptParser.td
@@ -173,7 +173,6 @@
class MarshallingInfoBooleanFlag<code keypath, code defaultvalue, code neg_name, string neg_spelling>
: MarshallingInfoFlag<keypath, defaultvalue> {
- bit ShouldAlwaysEmit = 1;
code Normalizer = "makeBooleanFlagNormalizer(OPT_"#neg_name#")";
code Denormalizer = "makeBooleanFlagDenormalizer(\""#neg_spelling#"\")";
}
Index: clang/unittests/Frontend/CompilerInvocationTest.cpp
===================================================================
--- clang/unittests/Frontend/CompilerInvocationTest.cpp
+++ clang/unittests/Frontend/CompilerInvocationTest.cpp
@@ -216,7 +216,7 @@
Invocation.generateCC1CommandLine(GeneratedArgs, *this);
ASSERT_THAT(GeneratedArgs,
- Contains(StrEq("-fno-experimental-new-pass-manager")));
+ Not(Contains(StrEq("-fno-experimental-new-pass-manager"))));
ASSERT_THAT(GeneratedArgs,
Not(Contains(StrEq("-fexperimental-new-pass-manager"))));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92857.310246.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201208/a11cc038/attachment.bin>
More information about the llvm-commits
mailing list