From d7bd78e36e1d3adfc90a4f95b2cc849d38af1b24 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 17 Sep 2009 01:08:43 +0000 Subject: 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 --- lib/Support/APFloat.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Support/APFloat.cpp') diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index d50e4e5601..bcf3d6d012 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -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) { -- cgit v1.2.3