diff options
| -rw-r--r-- | llvm/lib/MC/MCSubtargetInfo.cpp | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCSubtargetInfo.cpp b/llvm/lib/MC/MCSubtargetInfo.cpp index ca3894b29d3..daba321c58e 100644 --- a/llvm/lib/MC/MCSubtargetInfo.cpp +++ b/llvm/lib/MC/MCSubtargetInfo.cpp @@ -93,9 +93,10 @@ MCSubtargetInfo::getSchedModelForCPU(StringRef CPU) const {    const SubtargetInfoKV *Found =      std::lower_bound(ProcSchedModels, ProcSchedModels+NumProcs, CPU);    if (Found == ProcSchedModels+NumProcs || StringRef(Found->Key) != CPU) { -    errs() << "'" << CPU -           << "' is not a recognized processor for this target" -           << " (ignoring processor)\n"; +    if (CPU != "help") // Don't error if the user asked for help. +      errs() << "'" << CPU +             << "' is not a recognized processor for this target" +             << " (ignoring processor)\n";      return MCSchedModel::GetDefaultSchedModel();    }    assert(Found->Value && "Missing processor SchedModel value");  | 

