[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp

Reid Spencer reid at x10sys.com
Mon Dec 6 23:06:57 PST 2004



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.114 -> 1.115
---
Log message:

Fix some comments.


---
Diffs of the changes:  (+2 -1)

Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.114 llvm/lib/VMCore/Constants.cpp:1.115
--- llvm/lib/VMCore/Constants.cpp:1.114	Tue Dec  7 00:46:50 2004
+++ llvm/lib/VMCore/Constants.cpp	Tue Dec  7 01:06:47 2004
@@ -440,8 +440,9 @@
   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:






More information about the llvm-commits mailing list