Add an APFloat::convertToInt(APSInt) function that automatically manages the

memory for the result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeffrey Yasskin
2011-07-15 07:04:56 +00:00
parent a83bba46b3
commit 3d42bfbbdd
3 changed files with 69 additions and 0 deletions

View File

@ -109,6 +109,7 @@ namespace llvm {
typedef signed short exponent_t;
struct fltSemantics;
class APSInt;
class StringRef;
/* When bits of a floating point number are truncated, this enum is
@ -283,6 +284,7 @@ namespace llvm {
opStatus convert(const fltSemantics &, roundingMode, bool *);
opStatus convertToInteger(integerPart *, unsigned int, bool,
roundingMode, bool *) const;
opStatus convertToInteger(APSInt&, roundingMode, bool *) const;
opStatus convertFromAPInt(const APInt &,
bool, roundingMode);
opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int,