[llvm] r316450 - [TableGen] Fix some formatting quirks in the subtarget output file.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 08:50:55 PDT 2017
Author: ctopper
Date: Tue Oct 24 08:50:55 2017
New Revision: 316450
URL: http://llvm.org/viewvc/llvm-project?rev=316450&view=rev
Log:
[TableGen] Fix some formatting quirks in the subtarget output file.
Modified:
llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=316450&r1=316449&r2=316450&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Tue Oct 24 08:50:55 2017
@@ -1157,9 +1157,10 @@ void SubtargetEmitter::EmitProcessorMode
OS << " nullptr, nullptr, 0, 0,"
<< " // No instruction-level machine model.\n";
if (PM.hasItineraries())
- OS << " " << PM.ItinsDef->getName() << "};\n";
+ OS << " " << PM.ItinsDef->getName() << "\n";
else
- OS << " nullptr}; // No Itinerary\n";
+ OS << " nullptr // No Itinerary\n";
+ OS << "};\n";
}
}
@@ -1225,7 +1226,7 @@ void SubtargetEmitter::EmitSchedModel(ra
// Emit the processor lookup data
EmitProcessorLookup(OS);
- OS << "#undef DBGFIELD";
+ OS << "\n#undef DBGFIELD";
}
void SubtargetEmitter::EmitSchedModelHelpers(const std::string &ClassName,
@@ -1389,7 +1390,7 @@ void SubtargetEmitter::run(raw_ostream &
#endif
// MCInstrInfo initialization routine.
- OS << "static inline MCSubtargetInfo *create" << Target
+ OS << "\nstatic inline MCSubtargetInfo *create" << Target
<< "MCSubtargetInfoImpl("
<< "const Triple &TT, StringRef CPU, StringRef FS) {\n";
OS << " return new MCSubtargetInfo(TT, CPU, FS, ";
More information about the llvm-commits
mailing list