[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y

Reid Spencer reid at x10sys.com
Mon Dec 6 14:18:36 PST 2004



Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.207 -> 1.208
---
Log message:

For PR409: http://llvm.cs.uiuc.edu/PR409 : \
Make sure to check isValueValidForType on floating point constants and give \
an error if the value is not valid, otherwise it would assert in the VMCore

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

Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.207 llvm/lib/AsmParser/llvmAsmParser.y:1.208
--- llvm/lib/AsmParser/llvmAsmParser.y:1.207	Sun Nov 28 10:45:45 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y	Mon Dec  6 16:18:25 2004
@@ -1318,6 +1318,8 @@
     $$ = ConstantBool::False;
   }
   | FPType FPVAL {                   // Float & Double constants
+    if (!ConstantFP::isValueValidForType($1, $2))
+      ThrowException("Floating point constant invalid for type!!");
     $$ = ConstantFP::get($1, $2);
   };
 






More information about the llvm-commits mailing list