git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216993
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(ProcItinListsIter != ProcItinLists.end() && "bad iterator");
std::vector<InstrItinerary> &ItinList = *ProcItinListsIter;
assert(ProcItinListsIter != ProcItinLists.end() && "bad iterator");
std::vector<InstrItinerary> &ItinList = *ProcItinListsIter;
+ // Empty itineraries aren't referenced anywhere in the tablegen output
+ // so don't emit them.
+ if (ItinList.empty())
+ continue;
+
OS << "\n";
OS << "static const llvm::InstrItinerary ";
OS << "\n";
OS << "static const llvm::InstrItinerary ";
- if (ItinList.empty()) {
- OS << '*' << Name << " = nullptr;\n";
- continue;
- }
// Begin processor itinerary table
OS << Name << "[] = {\n";
// Begin processor itinerary table
OS << Name << "[] = {\n";