Replace snprintf with raw_string_ostream.

llvm-svn: 141116
This commit is contained in:
Francois Pichet 2011-10-04 21:08:56 +00:00
parent f3e1fc3f86
commit aec9739e16
1 changed files with 4 additions and 7 deletions

View File

@ -24,10 +24,6 @@
#include <cstdlib>
#include <cstring>
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
namespace llvm {
typedef std::map<std::string, std::string> TGPPEnvironment;
@ -170,9 +166,10 @@ public:
if (Kind == tgpprange_list)
return Vals.at(i);
else {
char buf[32];
snprintf(buf, sizeof(buf), "%ld", From + (long int)i);
return std::string(buf);
std::string Result;
raw_string_ostream Tmp(Result);
Tmp << (From + (long int)i);
return Tmp.str();
}
}