diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-09-17 01:08:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-09-17 01:08:43 +0000 |
| commit | ac6271e3f4c8a2afff3abc51d770d8973a22c672 (patch) | |
| tree | 06fdc84aadbe19127084de414537b1b2dfd6a392 /llvm/lib/Support/APFloat.cpp | |
| parent | f56b0482c4e2be4b63efa60b611d5d25951b1332 (diff) | |
| download | bcm5719-llvm-ac6271e3f4c8a2afff3abc51d770d8973a22c672.tar.gz bcm5719-llvm-ac6271e3f4c8a2afff3abc51d770d8973a22c672.zip | |
add a version of the APFloat constructor that initializes to 0.0
llvm-svn: 82110
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
| -rw-r--r-- | llvm/lib/Support/APFloat.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |

