OSDN Git Service

Use StringRef in TableGen emitted API for attribute (NFC)
authorMehdi Amini <mehdi.amini@apple.com>
Tue, 4 Oct 2016 23:31:39 +0000 (23:31 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Tue, 4 Oct 2016 23:31:39 +0000 (23:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283268 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/Attributes.cpp

index 58dbe57..927f6e0 100644 (file)
@@ -156,7 +156,7 @@ void Attributes::printStrBoolAttrClasses(raw_ostream &OS,
   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";