[clang] 06285fc - [test][clang] Use -clear-ast-before-backend instead of -flegacy-pass-manager in CommandLineTest
Arthur Eubanks via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 11 14:08:04 PDT 2022
Author: Arthur Eubanks
Date: 2022-04-11T14:06:40-07:00
New Revision: 06285fc9fd522b5ab99f607b8123f4056d97e289
URL: https://github.com/llvm/llvm-project/commit/06285fc9fd522b5ab99f607b8123f4056d97e289
DIFF: https://github.com/llvm/llvm-project/commit/06285fc9fd522b5ab99f607b8123f4056d97e289.diff
LOG: [test][clang] Use -clear-ast-before-backend instead of -flegacy-pass-manager in CommandLineTest
Added:
Modified:
clang/unittests/Frontend/CompilerInvocationTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp
index d7f5af824e255..fe6785257e926 100644
--- a/clang/unittests/Frontend/CompilerInvocationTest.cpp
+++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp
@@ -263,34 +263,34 @@ TEST_F(CommandLineTest, BoolOptionDefaultArbitraryTwoFlagsPresentNone) {
const char *Args = {""};
ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags));
- ASSERT_EQ(Invocation.getCodeGenOpts().LegacyPassManager, false);
+ ASSERT_EQ(Invocation.getCodeGenOpts().ClearASTBeforeBackend, false);
Invocation.generateCC1CommandLine(GeneratedArgs, *this);
- ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fno-legacy-pass-manager"))));
- ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-flegacy-pass-manager"))));
+ ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-no-clear-ast-before-backend"))));
+ ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-clear-ast-before-backend"))));
}
TEST_F(CommandLineTest, BoolOptionDefaultArbitraryTwoFlagsPresentChange) {
- const char *Args[] = {"-flegacy-pass-manager"};
+ const char *Args[] = {"-clear-ast-before-backend"};
ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags));
- ASSERT_EQ(Invocation.getCodeGenOpts().LegacyPassManager, true);
+ ASSERT_EQ(Invocation.getCodeGenOpts().ClearASTBeforeBackend, true);
Invocation.generateCC1CommandLine(GeneratedArgs, *this);
- ASSERT_THAT(GeneratedArgs, Contains(StrEq("-flegacy-pass-manager")));
- ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fno-legacy-pass-manager"))));
+ ASSERT_THAT(GeneratedArgs, Contains(StrEq("-clear-ast-before-backend")));
+ ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-no-clear-ast-before-backend"))));
}
TEST_F(CommandLineTest, BoolOptionDefaultArbitraryTwoFlagsPresentReset) {
- const char *Args[] = {"-fno-legacy-pass-manager"};
+ const char *Args[] = {"-no-clear-ast-before-backend"};
ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags));
- ASSERT_EQ(Invocation.getCodeGenOpts().LegacyPassManager, false);
+ ASSERT_EQ(Invocation.getCodeGenOpts().ClearASTBeforeBackend, false);
Invocation.generateCC1CommandLine(GeneratedArgs, *this);
- ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fno-legacy-pass-manager"))));
- ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-flegacy-pass-manager"))));
+ ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-no-clear-ast-before-backend"))));
+ ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-clear-ast-before-backend"))));
}
// Boolean option that gets the CC1Option flag from a let statement (which
More information about the cfe-commits
mailing list