[llvm] r283273 - Use StringRef in TableGen (NFC)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 16:47:34 PDT 2016
Author: mehdi_amini
Date: Tue Oct 4 18:47:33 2016
New Revision: 283273
URL: http://llvm.org/viewvc/llvm-project?rev=283273&view=rev
Log:
Use StringRef in TableGen (NFC)
Modified:
llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=283273&r1=283272&r2=283273&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Tue Oct 4 18:47:33 2016
@@ -166,7 +166,7 @@ static void dumpBits(raw_ostream &o, con
}
}
-static BitsInit &getBitsField(const Record &def, const char *str) {
+static BitsInit &getBitsField(const Record &def, StringRef str) {
BitsInit *bits = def.getValueAsBitsInit(str);
return *bits;
}
Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=283273&r1=283272&r2=283273&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Tue Oct 4 18:47:33 2016
@@ -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)
More information about the llvm-commits
mailing list