1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[NewPM][opt] Assert PassPipeline and Passes don't both contain passes

Reviewers: asbirlea

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82512
This commit is contained in:
Arthur Eubanks 2020-06-24 17:07:13 -07:00
parent 9e71156d6d
commit 4cd332044f

View File

@ -333,6 +333,8 @@ bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
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";