aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-07 07:06:47 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-07 07:06:47 +0000
commit79457c791ed282a7e65f9096b2ada1a54e434848 (patch)
treeaa7b15ba1b74589a558854ab1c43bb3991ebed8c
parenteb61d60e1b7f630be3cf86d01f00c604d40e5cea (diff)
downloadexternal_llvm-79457c791ed282a7e65f9096b2ada1a54e434848.zip
external_llvm-79457c791ed282a7e65f9096b2ada1a54e434848.tar.gz
external_llvm-79457c791ed282a7e65f9096b2ada1a54e434848.tar.bz2
Fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18596 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Constants.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index dc64161..1ed6ed5 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -440,8 +440,9 @@ 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: