mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
Replace snprintf with raw_string_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
20f8eb2fc1
commit
11ad7e5d58
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user