Add support to the bytecode writer to recognize floating point constants

llvm-svn: 190
This commit is contained in:
Chris Lattner 2001-07-15 00:17:23 +00:00
parent f435e200b1
commit 4d44c2ba81

View File

@ -138,10 +138,16 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) {
break;
}
case Type::FloatTyID: // Floating point types...
case Type::DoubleTyID:
// TODO: Floating point type serialization
case Type::FloatTyID: { // Floating point types...
float Tmp = (float)((const ConstPoolFP*)CPV)->getValue();
output_data(&Tmp, &Tmp+1, Out);
break;
}
case Type::DoubleTyID: {
double Tmp = ((const ConstPoolFP*)CPV)->getValue();
output_data(&Tmp, &Tmp+1, Out);
break;
}
case Type::VoidTyID:
case Type::LabelTyID: