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:
3d52b2f
)
Add support to the bytecode reader to recognize floating point constants
author
Chris Lattner
<sabre@nondot.org>
Sun, 15 Jul 2001 00:17:18 +0000
(
00:17
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 15 Jul 2001 00:17:18 +0000
(
00:17
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Bytecode/Reader/ConstantReader.cpp
patch
|
blob
|
history
diff --git
a/lib/Bytecode/Reader/ConstantReader.cpp
b/lib/Bytecode/Reader/ConstantReader.cpp
index dd47d1c2cfb6668995ddbc48e0ae2d5e02ac73d7..2994128f7d6d07c13734cd8a13e3d5d2b2d80dbd 100644
(file)
--- a/
lib/Bytecode/Reader/ConstantReader.cpp
+++ b/
lib/Bytecode/Reader/ConstantReader.cpp
@@
-139,6
+139,20
@@
bool BytecodeParser::parseConstPoolValue(const uchar *&Buf,
break;
}
+ case Type::FloatTyID: {
+ float F;
+ if (input_data(Buf, EndBuf, &F, &F+1)) return true;
+ V = new ConstPoolFP(Ty, F);
+ break;
+ }
+
+ case Type::DoubleTyID: {
+ double Val;
+ if (input_data(Buf, EndBuf, &Val, &Val+1)) return true;
+ V = new ConstPoolFP(Ty, Val);
+ break;
+ }
+
case Type::TypeTyID:
if (parseTypeConstant(Buf, EndBuf, V)) return true;
break;