Skip to content
Snippets Groups Projects
Commit ac7d62cc authored by Aaron Ballman's avatar Aaron Ballman
Browse files

MinGW doesn't implement std::to_string; working around it. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222033 91177308-0d34-0410-b5e6-96231b3b80d8
parent 3de29e1e
No related branches found
No related tags found
No related merge requests found
...@@ -1880,8 +1880,13 @@ static void GenerateHasAttrSpellingStringSwitch( ...@@ -1880,8 +1880,13 @@ static void GenerateHasAttrSpellingStringSwitch(
// present in the caller. // present in the caller.
Test = "LangOpts.CPlusPlus11"; 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 = 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); std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(*Attr);
for (const auto &S : Spellings) for (const auto &S : Spellings)
if (Variety.empty() || (Variety == S.variety() && if (Variety.empty() || (Variety == S.variety() &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment