]> granicus.if.org Git - clang/commitdiff
Remove redundant uses of SmallString
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Tue, 19 Jun 2012 18:12:18 +0000 (18:12 +0000)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Tue, 19 Jun 2012 18:12:18 +0000 (18:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158731 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangAttrEmitter.cpp

index 0df566f7123f061e0ad3b92d22abecc603edef6e..61fd86f1709262520d36f9cf0a492224a9b0e438 100644 (file)
@@ -966,9 +966,7 @@ void EmitClangAttrSpellingList(RecordKeeper &Records, raw_ostream &OS) {
     std::vector<Record*> Spellings = Attr.getValueAsListOfDefs("Spellings");
 
     for (std::vector<Record*>::const_iterator I = Spellings.begin(), E = Spellings.end(); I != E; ++I) {
-      SmallString<64> Spelling;
-      Spelling += (*I)->getValueAsString("Name");
-      OS << ".Case(\"" << Spelling << "\", true)\n";
+      OS << ".Case(\"" << (*I)->getValueAsString("Name") << "\", true)\n";
     }
   }
 
@@ -1101,8 +1099,7 @@ void EmitClangAttrParsedAttrList(RecordKeeper &Records, raw_ostream &OS) {
         
         for (std::vector<Record*>::const_iterator I = Spellings.begin(),
              E = Spellings.end(); I != E; ++I) {
-          SmallString<64> AttrName;
-          AttrName += (*I)->getValueAsString("Name");
+          std::string AttrName = (*I)->getValueAsString("Name");
 
           StringRef Spelling = NormalizeAttrName(AttrName);
 
@@ -1137,8 +1134,7 @@ void EmitClangAttrParsedAttrKinds(RecordKeeper &Records, raw_ostream &OS) {
 
       for (std::vector<Record*>::const_iterator I = Spellings.begin(),
            E = Spellings.end(); I != E; ++I) {
-        SmallString<64> RawSpelling;
-        RawSpelling += (*I)->getValueAsString("Name");
+        std::string RawSpelling = (*I)->getValueAsString("Name");
         StringRef AttrName = NormalizeAttrName(DistinctSpellings
                                                  ? StringRef(RawSpelling)
                                                  : StringRef(Attr.getName()));