diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-17 15:27:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-17 15:27:33 +0000 |
commit | 67798cb3dde8d50450246fa348b69a9bd115b72c (patch) | |
tree | 11d60ee981b36f2931f5d9e668bd6f4d7fea93e3 | |
parent | 79cc005a071deadfa0ac740fe47381537b0398cd (diff) |
strtod is more portable than strtof apparently. Instead of making this conditional,
just always use strtod. This is temporary code anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39972 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Lex/LiteralSupport.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Lex/LiteralSupport.cpp b/Lex/LiteralSupport.cpp index cbd7207a0a..cd2082a3cb 100644 --- a/Lex/LiteralSupport.cpp +++ b/Lex/LiteralSupport.cpp @@ -19,12 +19,6 @@ #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Config/config.h" -#if HAVE_STRTOF -#else -# define strtof strtod -#endif - using namespace clang; /// HexDigitValue - Return the value of the specified hex digit, or -1 if it's @@ -423,7 +417,7 @@ float NumericLiteralParser::GetFloatValue() { char floatChars[256]; strncpy(floatChars, ThisTokBegin, ThisTokEnd-ThisTokBegin); floatChars[ThisTokEnd-ThisTokBegin] = '\0'; - return strtof(floatChars, 0); + return (float)strtod(floatChars, 0); } void NumericLiteralParser::Diag(SourceLocation Loc, unsigned DiagID, |