projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb61d60
)
Fix some comments.
author
Reid Spencer
<rspencer@reidspencer.com>
Tue, 7 Dec 2004 07:06:47 +0000
(07:06 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Tue, 7 Dec 2004 07:06:47 +0000
(07:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18596
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Constants.cpp
b/lib/VMCore/Constants.cpp
index dc64161ce07ee882c164bb00b11f5ebca2543625..1ed6ed58b31406153216f1751c568a0733fdf07e 100644
(file)
--- 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: