summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit744d95e8c74257c12b34ea0528362a6442199c40 (patch)
tree6e34ac148e919d3ef82698243cd6e5651d1329be /llvm
parent2b918420921d16a90b4e0c6ffe883695b3e64d2a (diff)
downloadbcm5719-llvm-744d95e8c74257c12b34ea0528362a6442199c40.tar.gz
bcm5719-llvm-744d95e8c74257c12b34ea0528362a6442199c40.zip
Fix some comments.
llvm-svn: 18596
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/VMCore/Constants.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index dc64161ce07..1ed6ed58b31 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/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:
OpenPOWER on IntegriCloud