]> granicus.if.org Git - clang/commitdiff
TableGen: Adapt to llvm r288612
authorMatthias Braun <matze@braunis.de>
Sun, 4 Dec 2016 05:55:09 +0000 (05:55 +0000)
committerMatthias Braun <matze@braunis.de>
Sun, 4 Dec 2016 05:55:09 +0000 (05:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288614 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangASTNodesEmitter.cpp
utils/TableGen/ClangAttrEmitter.cpp

index b17a4a374a290b89468a9764a23bf05e887287ae..b132dcbead5c8cc0606d44ed7a7c633b32ac7729 100644 (file)
@@ -47,7 +47,7 @@ class ClangASTNodesEmitter {
     if (&R == &Root && !BaseSuffix.empty())
       return BaseSuffix;
 
-    return R.getName() + BaseSuffix;
+    return R.getName().str() + BaseSuffix;
   }
 
   std::pair<Record *, Record *> EmitNode (const ChildMap &Tree, raw_ostream& OS,
index 8185b6ab1e2a2a9461625d5731478df7459880d4..d65794e8637490d9840391dbe40c5554bd1a56f4 100644 (file)
@@ -2695,7 +2695,7 @@ static std::string GetSubjectWithSuffix(const Record *R) {
 
 static std::string GenerateCustomAppertainsTo(const Record &Subject,
                                               raw_ostream &OS) {
-  std::string FnName = "is" + Subject.getName();
+  std::string FnName = "is" + Subject.getName().str();
 
   // If this code has already been generated, simply return the previous
   // instance of it.
@@ -2744,7 +2744,7 @@ static std::string GenerateAppertainsTo(const Record &Attr, raw_ostream &OS) {
   // Otherwise, generate an appertainsTo check specific to this attribute which
   // checks all of the given subjects against the Decl passed in. Return the
   // name of that check to the caller.
-  std::string FnName = "check" + Attr.getName() + "AppertainsTo";
+  std::string FnName = "check" + Attr.getName().str() + "AppertainsTo";
   std::stringstream SS;
   SS << "static bool " << FnName << "(Sema &S, const AttributeList &Attr, ";
   SS << "const Decl *D) {\n";
@@ -2915,7 +2915,7 @@ static std::string GenerateSpellingIndexToSemanticSpelling(const Record &Attr,
   // Generate the enumeration we will use for the mapping.
   SemanticSpellingMap SemanticToSyntacticMap;
   std::string Enum = CreateSemanticSpellings(Spellings, SemanticToSyntacticMap);
-  std::string Name = Attr.getName() + "AttrSpellingMap";
+  std::string Name = Attr.getName().str() + "AttrSpellingMap";
 
   OS << "static unsigned " << Name << "(const AttributeList &Attr) {\n";
   OS << Enum;