Prepare the writer for a non-broken implementation of writing floating

point values. This will be fixed when I figure out how to do it correctly
without depending on knowing the endianess of a platform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2004-07-11 17:22:07 +00:00
parent beff74f821
commit 87bc418334
2 changed files with 19 additions and 2 deletions

View File

@@ -176,12 +176,12 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
case Type::FloatTyID: { // Floating point types...
float Tmp = (float)cast<ConstantFP>(CPV)->getValue();
output_data(&Tmp, &Tmp+1, Out);
output_float(Tmp, Out);
break;
}
case Type::DoubleTyID: {
double Tmp = cast<ConstantFP>(CPV)->getValue();
output_data(&Tmp, &Tmp+1, Out);
output_double(Tmp, Out);
break;
}