diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp --- a/llvm/tools/opt/NewPMDriver.cpp +++ b/llvm/tools/opt/NewPMDriver.cpp @@ -333,6 +333,8 @@ MPM.addPass(NewPMDebugifyPass()); if (!PassPipeline.empty()) { + assert(Passes.empty() && + "PassPipeline and Passes should not both contain passes"); if (auto Err = PB.parsePassPipeline(MPM, PassPipeline, VerifyEachPass, DebugPM)) { errs() << Arg0 << ": " << toString(std::move(Err)) << "\n";