summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-06-24 09:57:59 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-06-24 09:57:59 +0000
commitf0e8cd1a7f606fb5953f2eac4d2521c0e33c83b0 (patch)
tree68c20bfa00f355b01b1f77726c5f92cc57bf1be1 /llvm/lib/Support/APFloat.cpp
parent9b877e18a321b325cc6095542f6c2438182521ce (diff)
downloadbcm5719-llvm-f0e8cd1a7f606fb5953f2eac4d2521c0e33c83b0.tar.gz
bcm5719-llvm-f0e8cd1a7f606fb5953f2eac4d2521c0e33c83b0.zip
[APFloat] Removed a assert from significandParts() which says that one can only access the significand of FiniteNonZero/NaN floats.
The method significandParts() is a helper method meant to ease access to APFloat's significand by allowing the user to not need to be aware of whether or not the APFloat is using memory allocated in the instance itself or in an external array. This assert says that one can only access the significand of FiniteNonZero/NaN floats. This makes it cumbersome and more importantly dangerous when one wishes to zero out the significand of a zero/infinity value since one will have to deal with the aforementioned quandary related to how the memory in APFloat is allocated. llvm-svn: 184711
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r--llvm/lib/Support/APFloat.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index ff8b7f157ee..db1d61c2813 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -847,8 +847,6 @@ APFloat::significandParts() const
integerPart *
APFloat::significandParts()
{
- assert(category == fcNormal || category == fcNaN);
-
if (partCount() > 1)
return significand.parts;
else
OpenPOWER on IntegriCloud