diff options
author | Dale Johannesen <dalej@apple.com> | 2007-09-07 18:31:50 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-09-07 18:31:50 +0000 |
commit | 073d48da50a1b68ae2d1a69c44d5cc18fd9e41dc (patch) | |
tree | 40eaba1cf0370da7f8efe94c872dfd76fd832e2d /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 588af2fb99bf255c350fcfc582e475cf4840c606 (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.cpp | 7 |
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 || |