mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Prevent repetitive warnings for unrecognized processors and features
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -96,14 +96,11 @@ MCSubtargetInfo::getSchedModelForCPU(StringRef CPU) const {
|
||||
#endif
|
||||
|
||||
// Find entry
|
||||
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";
|
||||
const SubtargetInfoKV *Found = SubtargetFeatures::Find(CPU, ProcSchedModels,
|
||||
NumProcs, "processor");
|
||||
if (!Found)
|
||||
return &MCSchedModel::DefaultSchedModel;
|
||||
}
|
||||
|
||||
assert(Found->Value && "Missing processor SchedModel value");
|
||||
return (const MCSchedModel *)Found->Value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user