forked from OSchip/llvm-project
[ASMParser] Parse FP constants in non-C locales
This patch fixes PR25788, which allows for the parsing of floating-point constants in non-C locales. Patch by Antoine Pitrou! Differential Revision: http://reviews.llvm.org/D15375 llvm-svn: 271574
This commit is contained in:
parent
dba8b4c04d
commit
a86df9bfdc
|
@ -958,7 +958,8 @@ lltok::Kind LLLexer::LexDigitOrNegative() {
|
|||
}
|
||||
}
|
||||
|
||||
APFloatVal = APFloat(std::atof(TokStart));
|
||||
APFloatVal = APFloat(APFloat::IEEEdouble,
|
||||
StringRef(TokStart, CurPtr - TokStart));
|
||||
return lltok::APFloat;
|
||||
}
|
||||
|
||||
|
@ -994,6 +995,7 @@ lltok::Kind LLLexer::LexPositive() {
|
|||
}
|
||||
}
|
||||
|
||||
APFloatVal = APFloat(std::atof(TokStart));
|
||||
APFloatVal = APFloat(APFloat::IEEEdouble,
|
||||
StringRef(TokStart, CurPtr - TokStart));
|
||||
return lltok::APFloat;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue