1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

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 856ac86318
commit 964af23ab4

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: