Don't print an error message when looking up the scheduling model if user specified...
authorCraig Topper <craig.topper@gmail.com>
Thu, 2 Apr 2015 04:27:50 +0000 (04:27 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 2 Apr 2015 04:27:50 +0000 (04:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233884 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCSubtargetInfo.cpp

index ca3894b29d39425adb3bb134db3c86ad0e1c9e36..daba321c58e3d0fbf5a9b5ff2c6d087149f9fa0c 100644 (file)
@@ -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");