summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2011-07-15 07:04:56 +0000
committerJeffrey Yasskin <jyasskin@google.com>2011-07-15 07:04:56 +0000
commit3d42bfbbdd26ac56ccd706d4ebee984490c72ecc (patch)
tree113144a5aa92be3e183b280dccd6c35296a4672b /include
parenta83bba46b38c255e18ebbe1262ea339431a1ef94 (diff)
downloadllvm-3d42bfbbdd26ac56ccd706d4ebee984490c72ecc.tar.gz
llvm-3d42bfbbdd26ac56ccd706d4ebee984490c72ecc.tar.bz2
llvm-3d42bfbbdd26ac56ccd706d4ebee984490c72ecc.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/APFloat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index 21b8c86d1d..d2566a44ba 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -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,