1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-22 10:36:10 +00:00

add a version of the APFloat constructor that initializes to 0.0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-09-17 01:08:43 +00:00
parent 5cf732e3b1
commit d7bd78e36e
2 changed files with 9 additions and 0 deletions
include/llvm/ADT
lib/Support

@ -173,6 +173,7 @@ namespace llvm {
};
// Constructors.
APFloat(const fltSemantics &); // Default construct to 0.0
APFloat(const fltSemantics &, const StringRef &);
APFloat(const fltSemantics &, integerPart);
APFloat(const fltSemantics &, fltCategory, bool negative, unsigned type=0);

@ -692,6 +692,14 @@ APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)
normalize(rmNearestTiesToEven, lfExactlyZero);
}
APFloat::APFloat(const fltSemantics &ourSemantics) {
assertArithmeticOK(ourSemantics);
initialize(&ourSemantics);
category = fcZero;
sign = false;
}
APFloat::APFloat(const fltSemantics &ourSemantics,
fltCategory ourCategory, bool negative, unsigned type)
{