Add support to the bytecode reader to recognize floating point constants

llvm-svn: 189
This commit is contained in:
Chris Lattner 2001-07-15 00:17:18 +00:00
parent 212f70d92e
commit f435e200b1
1 changed files with 14 additions and 0 deletions

View File

@ -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;