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")))); }
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")))); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits