diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-11-17 18:17:19 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-11-17 18:17:19 +0000 |
| commit | 28afa1849637e0a61b40a858b5035dac4ba4542e (patch) | |
| tree | 85ca0de9fbdc59c5c662b437c9a2a8a606965465 | |
| parent | 1d6af02e2d6b2c403c7ae78fa07c8cce8fdab7fb (diff) | |
| download | bcm5719-llvm-28afa1849637e0a61b40a858b5035dac4ba4542e.tar.gz bcm5719-llvm-28afa1849637e0a61b40a858b5035dac4ba4542e.zip | |
Fixing a use of stringstream to use an LLVM helper function. Drive-by fixing header include order. NFC.
llvm-svn: 222151
| -rw-r--r-- | clang/utils/TableGen/ClangAttrEmitter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index efb0b9b906b..10b70fcee14 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -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() && |

