Use StringRef in TableGen (NFC)
authorMehdi Amini <mehdi.amini@apple.com>
Tue, 4 Oct 2016 23:47:33 +0000 (23:47 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Tue, 4 Oct 2016 23:47:33 +0000 (23:47 +0000)
llvm-svn: 283273

llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
llvm/utils/TableGen/SubtargetEmitter.cpp

index 733c754..d0c4e0f 100644 (file)
@@ -166,7 +166,7 @@ static void dumpBits(raw_ostream &o, const BitsInit &bits) {
   }
 }
 
-static BitsInit &getBitsField(const Record &def, const char *str) {
+static BitsInit &getBitsField(const Record &def, StringRef str) {
   BitsInit *bits = def.getValueAsBitsInit(str);
   return *bits;
 }
index 9719412..c02e98a 100644 (file)
@@ -86,7 +86,7 @@ class SubtargetEmitter {
   void EmitItineraries(raw_ostream &OS,
                        std::vector<std::vector<InstrItinerary> >
                          &ProcItinLists);
-  void EmitProcessorProp(raw_ostream &OS, const Record *R, const char *Name,
+  void EmitProcessorProp(raw_ostream &OS, const Record *R, StringRef Name,
                          char Separator);
   void EmitProcessorResources(const CodeGenProcModel &ProcModel,
                               raw_ostream &OS);
@@ -587,7 +587,7 @@ EmitItineraries(raw_ostream &OS,
 // value defined in the C++ header. The Record is null if the processor does not
 // define a model.
 void SubtargetEmitter::EmitProcessorProp(raw_ostream &OS, const Record *R,
-                                         const char *Name, char Separator) {
+                                         StringRef Name, char Separator) {
   OS << "  ";
   int V = R ? R->getValueAsInt(Name) : -1;
   if (V >= 0)