diff options
author | Chris Lattner <sabre@nondot.org> | 2001-07-15 00:17:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-07-15 00:17:18 +0000 |
commit | a1375303415f645af6900d0a7141411e8ffbd430 (patch) | |
tree | a4e86f625eb4390503252ec46b8699e46ee2c66a /lib/Bytecode/Reader/ConstantReader.cpp | |
parent | 3d52b2fdcc07ce26c61adf99822adfa8251696cc (diff) |
Add support to the bytecode reader to recognize floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r-- | lib/Bytecode/Reader/ConstantReader.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp index dd47d1c2cf..2994128f7d 100644 --- 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; |