[llvm] r233884 - Don't print an error message when looking up the scheduling model if user specified -mcpu=help.
Craig Topper
craig.topper at gmail.com
Wed Apr 1 21:27:50 PDT 2015
Author: ctopper
Date: Wed Apr 1 23:27:50 2015
New Revision: 233884
URL: http://llvm.org/viewvc/llvm-project?rev=233884&view=rev
Log:
Don't print an error message when looking up the scheduling model if user specified -mcpu=help.
Modified:
llvm/trunk/lib/MC/MCSubtargetInfo.cpp
Modified: llvm/trunk/lib/MC/MCSubtargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSubtargetInfo.cpp?rev=233884&r1=233883&r2=233884&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSubtargetInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCSubtargetInfo.cpp Wed Apr 1 23:27:50 2015
@@ -93,9 +93,10 @@ MCSubtargetInfo::getSchedModelForCPU(Str
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");
More information about the llvm-commits
mailing list