Skip to content

Commit 600b9aa

Browse files
committed
[llc] Report error in lieu of warning for invalid cl option
1 parent 6e3b475 commit 600b9aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/tools/llc/NewPMDriver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ int llvm::compileModuleWithNewPM(
9393
CodeGenFileType FileType) {
9494

9595
if (!PassPipeline.empty() && TargetPassConfig::hasLimitedCodeGenPipeline()) {
96-
WithColor::warning(errs(), Arg0)
96+
WithColor::error(errs(), Arg0)
9797
<< "--passes cannot be used with "
9898
<< TargetPassConfig::getLimitedCodeGenPipelineReason() << ".\n";
9999
return 1;
@@ -139,7 +139,7 @@ int llvm::compileModuleWithNewPM(
139139
// selection.
140140

141141
if (!MIR) {
142-
WithColor::warning(errs(), Arg0) << "-passes is for .mir file only.\n";
142+
WithColor::error(errs(), Arg0) << "-passes is for .mir file only.\n";
143143
return 1;
144144
}
145145

llvm/tools/llc/llc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,15 +692,15 @@ static int compileModule(char **argv, LLVMContext &Context) {
692692
// selection.
693693
if (!getRunPassNames().empty()) {
694694
if (!MIR) {
695-
WithColor::warning(errs(), argv[0])
695+
WithColor::error(errs(), argv[0])
696696
<< "run-pass is for .mir file only.\n";
697697
delete MMIWP;
698698
return 1;
699699
}
700700
TargetPassConfig *PTPC = Target->createPassConfig(PM);
701701
TargetPassConfig &TPC = *PTPC;
702702
if (TPC.hasLimitedCodeGenPipeline()) {
703-
WithColor::warning(errs(), argv[0])
703+
WithColor::error(errs(), argv[0])
704704
<< "run-pass cannot be used with "
705705
<< TPC.getLimitedCodeGenPipelineReason() << ".\n";
706706
delete PTPC;

0 commit comments

Comments
 (0)