From 0a45405fdb279b5cb29b0d40da9c5e0375087c05 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 5 Feb 2015 19:54:27 +0000 Subject: [PATCH] InstrProf: Avoid using std::to_string Apparently std::to_string doesn't exist in mingw32: http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7990 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228340 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ProfileData/CoverageMappingTest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unittests/ProfileData/CoverageMappingTest.cpp b/unittests/ProfileData/CoverageMappingTest.cpp index 5709f91b0a4..859c5127a67 100644 --- a/unittests/ProfileData/CoverageMappingTest.cpp +++ b/unittests/ProfileData/CoverageMappingTest.cpp @@ -13,7 +13,7 @@ #include "llvm/Support/raw_ostream.h" #include "gtest/gtest.h" -#include +#include using namespace llvm; using namespace coverage; @@ -52,7 +52,9 @@ readCoverageRegions(std::string Coverage, int NumFiles) { SmallVector Filenames; SmallVector FilenameRefs; for (int I = 0; I < NumFiles; ++I) { - Filenames.push_back("file" + std::to_string(I)); + std::ostringstream S; + S << "file" << I; + Filenames.push_back(S.str()); FilenameRefs.push_back(Filenames.back()); } -- 2.34.1