aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-17 01:08:43 +0000
committerChris Lattner <sabre@nondot.org>2009-09-17 01:08:43 +0000
commitd7bd78e36e1d3adfc90a4f95b2cc849d38af1b24 (patch)
treed7c653a892e41db3b927f5cbdc83b533bc86df9c /lib/Support
parent5cf732e3b143df35fe2e956c73b60685fd5f0aeb (diff)
downloadexternal_llvm-d7bd78e36e1d3adfc90a4f95b2cc849d38af1b24.zip
external_llvm-d7bd78e36e1d3adfc90a4f95b2cc849d38af1b24.tar.gz
external_llvm-d7bd78e36e1d3adfc90a4f95b2cc849d38af1b24.tar.bz2
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
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/APFloat.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index d50e4e5..bcf3d6d 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)
{