From ac6271e3f4c8a2afff3abc51d770d8973a22c672 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 llvm-svn: 82110 --- llvm/lib/Support/APFloat.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/Support/APFloat.cpp') diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index d50e4e56018..bcf3d6d0125 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/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