[cfe-commits] r158731 - /cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp

Sean Hunt scshunt at csclub.uwaterloo.ca
Tue Jun 19 11:12:18 PDT 2012


Author: coppro
Date: Tue Jun 19 13:12:18 2012
New Revision: 158731

URL: http://llvm.org/viewvc/llvm-project?rev=158731&view=rev
Log:
Remove redundant uses of SmallString

Modified:
    cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp

Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=158731&r1=158730&r2=158731&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Tue Jun 19 13:12:18 2012
@@ -966,9 +966,7 @@
     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 @@
         
         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 @@
 
       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()));





More information about the cfe-commits mailing list