diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-07 07:38:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-07 07:38:08 +0000 |
commit | 574cdb32a032a4407cc37f84e3a9224770e90e63 (patch) | |
tree | acfc28ba75a4fce1c192e1428daa8363682daad2 /lib | |
parent | e2432596ac00f52421e166febd7d94c0b8446539 (diff) | |
download | external_llvm-574cdb32a032a4407cc37f84e3a9224770e90e63.zip external_llvm-574cdb32a032a4407cc37f84e3a9224770e90e63.tar.gz external_llvm-574cdb32a032a4407cc37f84e3a9224770e90e63.tar.bz2 |
Revert the recent patches to "fix" ConstantFP::isValueValidForType. None
of them seem to work everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Constants.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 6aa218c..97e4fa5 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -21,7 +21,6 @@ #include "llvm/ADT/StringExtras.h" #include <algorithm> #include <iostream> -#include "math.h" using namespace llvm; ConstantBool *ConstantBool::True = new ConstantBool(true); @@ -441,11 +440,8 @@ bool ConstantFP::isValueValidForType(const Type *Ty, double Val) { default: return false; // These can't be represented as floating point! + // TODO: Figure out how to test if a double can be cast to a float! case Type::FloatTyID: - // Since we're passed a double but the ConstantFP is of type float, make - // sure that the double value is in the range of a float - return isinf(Val) || isnan(Val) || (Val >= -HUGE_VALF && Val <= HUGE_VALF); - case Type::DoubleTyID: return true; // This is the largest type... } |