aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-09-07 18:31:50 +0000
committerDale Johannesen <dalej@apple.com>2007-09-07 18:31:50 +0000
commit073d48da50a1b68ae2d1a69c44d5cc18fd9e41dc (patch)
tree40eaba1cf0370da7f8efe94c872dfd76fd832e2d /lib/Bitcode/Writer/BitcodeWriter.cpp
parent588af2fb99bf255c350fcfc582e475cf4840c606 (diff)
Revert previous change to IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index ab3d9834d1..73f5338dcc 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -526,10 +526,9 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
Code = bitc::CST_CODE_FLOAT;
const Type *Ty = CFP->getType();
- if (Ty == Type::FloatTy) {
- Record.push_back(DoubleToBits((double)CFP->getValueAPF().
- convertToFloat()));
- } else if (Ty == Type::DoubleTy) {
+ if (Ty == Type::FloatTy)
+ Record.push_back(FloatToBits(CFP->getValueAPF().convertToFloat()));
+ else if (Ty == Type::DoubleTy) {
Record.push_back(DoubleToBits(CFP->getValueAPF().convertToDouble()));
// FIXME: make long double constants work.
} else if (Ty == Type::X86_FP80Ty ||