Do not use host floating point types when emitting
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts. Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62712 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index c296770..d8d414d 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -599,7 +599,8 @@
}
/* Make this number a NaN, with an arbitrary but deterministic value
- for the significand. */
+ for the significand. If double or longer, this is a signalling NaN,
+ which may not be ideal. */
void
APFloat::makeNaN(void)
{
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp
index d2b02f2..3a1a0cd 100644
--- a/lib/Support/FoldingSet.cpp
+++ b/lib/Support/FoldingSet.cpp
@@ -61,12 +61,6 @@
if ((uint64_t)(int)I != I)
Bits.push_back(unsigned(I >> 32));
}
-void FoldingSetNodeID::AddFloat(float F) {
- Bits.push_back(FloatToBits(F));
-}
-void FoldingSetNodeID::AddDouble(double D) {
- AddInteger(DoubleToBits(D));
-}
void FoldingSetNodeID::AddString(const char *String) {
unsigned Size = static_cast<unsigned>(strlen(String));