; REQUIRES: x86-registered-target
-; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
-; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -passes=instcombine 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
-; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -instcombine 2>&1 | FileCheck %s --check-prefix=WARN
-; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -instcombine -globaldce 2>&1 | FileCheck %s --check-prefix=WARN
-; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -instcombine -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
-; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -codegenprepare -mtriple=x86_64-unknown-linux-gnu 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
+; RUN: opt /dev/null -disable-output 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
+; RUN: opt /dev/null -disable-output -passes=instcombine 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
+; RUN: not opt /dev/null -disable-output -instcombine 2>&1 | FileCheck %s --check-prefix=WARN
+; RUN: not opt /dev/null -disable-output -instcombine -globaldce 2>&1 | FileCheck %s --check-prefix=WARN
+; RUN: opt /dev/null -disable-output -instcombine -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
+; RUN: opt /dev/null -disable-output -codegenprepare -mtriple=x86_64-unknown-linux-gnu 2>&1 | FileCheck %s --check-prefix=OK --allow-empty
; OK-NOT: deprecated
-; WARN: The `opt -passname` syntax for the new pass manager is deprecated, please use `opt -passes=<pipeline>` (or the `-p` alias for a more concise version).
+; WARN: The `opt -passname` syntax for the new pass manager is not supported, please use `opt -passes=<pipeline>` (or the `-p` alias for a more concise version).
static cl::alias PassPipeline2("p", cl::aliasopt(PassPipeline),
cl::desc("Alias for -passes"));
-static cl::opt<bool> TemporarilyAllowOldPassesSyntax(
- "temporarily-allow-old-pass-syntax",
- cl::desc("Do not use in new tests. To be removed once all tests have "
- "migrated."),
- cl::init(false));
-
static cl::opt<bool> PrintPasses("print-passes",
cl::desc("Print available passes that can be "
"specified in -passes=foo and exit"));
const bool UseNPM = (EnableNewPassManager && !shouldForceLegacyPM()) ||
PassPipeline.getNumOccurrences() > 0;
+ if (UseNPM && !PassList.empty()) {
+ errs() << "The `opt -passname` syntax for the new pass manager is "
+ "not supported, please use `opt -passes=<pipeline>` (or the `-p` "
+ "alias for a more concise version).\n";
+ errs() << "See https://llvm.org/docs/NewPassManager.html#invoking-opt "
+ "for more details on the pass pipeline syntax.\n\n";
+ return 1;
+ }
+
if (!UseNPM && PluginList.size()) {
errs() << argv[0] << ": " << PassPlugins.ArgStr
<< " specified with legacy PM.\n";
"-passes='default<O#>,other-pass'\n";
return 1;
}
- if (!PassList.empty()) {
- errs() << "The `opt -passname` syntax for the new pass manager is "
- "deprecated, please use `opt -passes=<pipeline>` (or the `-p` "
- "alias for a more concise version).\n";
- errs() << "See https://llvm.org/docs/NewPassManager.html#invoking-opt "
- "for more details on the pass pipeline syntax.\n\n";
- if (!TemporarilyAllowOldPassesSyntax)
- return 1;
- }
std::string Pipeline = PassPipeline;
SmallVector<StringRef, 4> Passes;