]> granicus.if.org Git - clang/commitdiff
Fixing a use of stringstream to use an LLVM helper function. Drive-by fixing header...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 17 Nov 2014 18:17:19 +0000 (18:17 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 17 Nov 2014 18:17:19 +0000 (18:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222151 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangAttrEmitter.cpp

index efb0b9b906b9fbb42e65b25666087c0023efd34c..10b70fcee14e92a8b00d5e6782d1b2f05e41e44d 100644 (file)
@@ -12,8 +12,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallSet.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/TableGen/Error.h"
 #include "llvm/TableGen/Record.h"
@@ -1880,13 +1881,8 @@ static void GenerateHasAttrSpellingStringSwitch(
       // present in the caller.
       Test = "LangOpts.CPlusPlus11";
 
-    // FIXME: When MinGW support is dropped, or they gain support for
-    // std::to_string, this hack can be dropped as well.
-    std::stringstream ss;
-    ss << Version;
-
     std::string TestStr =
-        !Test.empty() ? Test + " ? " + ss.str() + " : 0" : "1";
+        !Test.empty() ? Test + " ? " + llvm::itostr(Version) + " : 0" : "1";
     std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(*Attr);
     for (const auto &S : Spellings)
       if (Variety.empty() || (Variety == S.variety() &&