llvm.org GIT mirror llvm / 2e35bed
Add a function to convert a double to a string git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 18 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
88 #define LLVM_TOOLS_STRING_EXTRAS_H
99
1010 #include
11 #include
1112 #include "llvm/Tools/DataTypes.h"
1213
1314 static inline string utostr(uint64_t X, bool isNeg = false) {
5960 return utostr((unsigned)X);
6061 }
6162
63 static inline string ftostr(double V) {
64 char Buffer[200];
65 snprintf(Buffer, 200, "%f", V);
66 return Buffer;
67 }
68
6269 #endif