diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-11-14 20:31:50 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-11-14 20:31:50 +0000 |
| commit | 1860862fe3e5e6491b7c9aec624c638da7dabe61 (patch) | |
| tree | 3fae4ad360414f76a2988ef2a9be8af437e34a87 | |
| parent | cc3c2b3946ee5625eb3b9f91494e7f52d8fd1af5 (diff) | |
| download | bcm5719-llvm-1860862fe3e5e6491b7c9aec624c638da7dabe61.tar.gz bcm5719-llvm-1860862fe3e5e6491b7c9aec624c638da7dabe61.zip | |
MinGW doesn't implement std::to_string; working around it. NFC.
llvm-svn: 222033
| -rw-r--r-- | clang/utils/TableGen/ClangAttrEmitter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 71b5c3650f3..efb0b9b906b 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -1880,8 +1880,13 @@ 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 + " ? " + std::to_string(Version) + " : 0" : "1"; + !Test.empty() ? Test + " ? " + ss.str() + " : 0" : "1"; std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(*Attr); for (const auto &S : Spellings) if (Variety.empty() || (Variety == S.variety() && |

