[llvm] r283268 - Use StringRef in TableGen emitted API for attribute (NFC)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 16:31:39 PDT 2016


Author: mehdi_amini
Date: Tue Oct  4 18:31:39 2016
New Revision: 283268

URL: http://llvm.org/viewvc/llvm-project?rev=283268&view=rev
Log:
Use StringRef in TableGen emitted API for attribute (NFC)

Modified:
    llvm/trunk/utils/TableGen/Attributes.cpp

Modified: llvm/trunk/utils/TableGen/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Attributes.cpp?rev=283268&r1=283267&r2=283268&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/Attributes.cpp (original)
+++ llvm/trunk/utils/TableGen/Attributes.cpp Tue Oct  4 18:31:39 2016
@@ -156,7 +156,7 @@ void Attributes::printStrBoolAttrClasses
   OS << "// StrBoolAttr classes\n";
   for (const auto *R : Records) {
     OS << "struct " << R->getName() << "Attr : StrBoolAttr {\n";
-    OS << "  static const char *getKind() {\n";
+    OS << "  static StringRef getKind() {\n";
     OS << "    return \"" << R->getValueAsString("AttrString") << "\";\n";
     OS << "  }\n";
     OS << "};\n";




More information about the llvm-commits mailing list