[APFloat] Removed a assert from significandParts() which says that one can only acces...
authorMichael Gottesman <mgottesman@apple.com>
Mon, 24 Jun 2013 09:57:59 +0000 (09:57 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Mon, 24 Jun 2013 09:57:59 +0000 (09:57 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184711 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APFloat.cpp

index ff8b7f157ee0eda6f19c8ff6f36a6d9cbc70ac44..db1d61c2813621b8194e6085b67fec8a04d1f0df 100644 (file)
@@ -847,8 +847,6 @@ APFloat::significandParts() const
 integerPart *
 APFloat::significandParts()
 {
-  assert(category == fcNormal || category == fcNaN);
-
   if (partCount() > 1)
     return significand.parts;
   else