summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-11 17:22:07 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-11 17:22:07 +0000
commita64b62ef6af9afb99c6c7092395190f36d864672 (patch)
tree05a9f46901ce6679325196738728288943ec36e1 /llvm/lib/Bytecode/Writer/ConstantWriter.cpp
parent802cffd928baf87277525c7d818a9a8e46195fbd (diff)
downloadbcm5719-llvm-a64b62ef6af9afb99c6c7092395190f36d864672.tar.gz
bcm5719-llvm-a64b62ef6af9afb99c6c7092395190f36d864672.zip
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. llvm-svn: 14762
Diffstat (limited to 'llvm/lib/Bytecode/Writer/ConstantWriter.cpp')
-rw-r--r--llvm/lib/Bytecode/Writer/ConstantWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
index 029e6cc2b54..8ea192b0a82 100644
--- a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
+++ b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
@@ -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;
}
OpenPOWER on IntegriCloud