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:
441c3cf
)
For PR409: \
author
Reid Spencer
<rspencer@reidspencer.com>
Mon, 6 Dec 2004 22:18:25 +0000
(22:18 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Mon, 6 Dec 2004 22:18:25 +0000
(22:18 +0000)
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18584
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AsmParser/llvmAsmParser.y
patch
|
blob
|
history
diff --git
a/lib/AsmParser/llvmAsmParser.y
b/lib/AsmParser/llvmAsmParser.y
index 4a4803ed875950fa386c2f1c23c2c4c290537e3e..070e978ffea476f071d3b88e653652d2dafb4ba7 100644
(file)
--- a/
lib/AsmParser/llvmAsmParser.y
+++ b/
lib/AsmParser/llvmAsmParser.y
@@
-1318,6
+1318,8
@@
ConstVal : SIntType EINT64VAL { // integral constants
$$ = ConstantBool::False;
}
| FPType FPVAL { // Float & Double constants
+ if (!ConstantFP::isValueValidForType($1, $2))
+ ThrowException("Floating point constant invalid for type!!");
$$ = ConstantFP::get($1, $2);
};