diff --git a/llvm/test/tools/llc/new-pm/option-conflict.ll b/llvm/test/tools/llc/new-pm/option-conflict.ll index 5847a32058756..5031e950fee21 100644 --- a/llvm/test/tools/llc/new-pm/option-conflict.ll +++ b/llvm/test/tools/llc/new-pm/option-conflict.ll @@ -1,3 +1,3 @@ ; RUN: not llc -mtriple=x86_64-pc-linux-gnu -passes=foo -start-before=mergeicmps -stop-after=gc-lowering -filetype=null %s 2>&1 | FileCheck %s -; CHECK: warning: --passes cannot be used with start-before and stop-after. +; CHECK: error: --passes cannot be used with start-before and stop-after. diff --git a/llvm/tools/llc/NewPMDriver.cpp b/llvm/tools/llc/NewPMDriver.cpp index 3892fbb8c74f7..25f7245e07976 100644 --- a/llvm/tools/llc/NewPMDriver.cpp +++ b/llvm/tools/llc/NewPMDriver.cpp @@ -93,7 +93,7 @@ int llvm::compileModuleWithNewPM( CodeGenFileType FileType) { if (!PassPipeline.empty() && TargetPassConfig::hasLimitedCodeGenPipeline()) { - WithColor::warning(errs(), Arg0) + WithColor::error(errs(), Arg0) << "--passes cannot be used with " << TargetPassConfig::getLimitedCodeGenPipelineReason() << ".\n"; return 1; @@ -139,7 +139,7 @@ int llvm::compileModuleWithNewPM( // selection. if (!MIR) { - WithColor::warning(errs(), Arg0) << "-passes is for .mir file only.\n"; + WithColor::error(errs(), Arg0) << "-passes is for .mir file only.\n"; return 1; } diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 3694ff79b5436..b01af688feb60 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -692,7 +692,7 @@ static int compileModule(char **argv, LLVMContext &Context) { // selection. if (!getRunPassNames().empty()) { if (!MIR) { - WithColor::warning(errs(), argv[0]) + WithColor::error(errs(), argv[0]) << "run-pass is for .mir file only.\n"; delete MMIWP; return 1; @@ -700,7 +700,7 @@ static int compileModule(char **argv, LLVMContext &Context) { TargetPassConfig *PTPC = Target->createPassConfig(PM); TargetPassConfig &TPC = *PTPC; if (TPC.hasLimitedCodeGenPipeline()) { - WithColor::warning(errs(), argv[0]) + WithColor::error(errs(), argv[0]) << "run-pass cannot be used with " << TPC.getLimitedCodeGenPipelineReason() << ".\n"; delete PTPC;