Revert previous change to IR.

llvm-svn: 41769
This commit is contained in:
Dale Johannesen
2007-09-07 18:31:50 +00:00
parent 1de0c86717
commit b6d795c1fc
2 changed files with 4 additions and 5 deletions

View File

@@ -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 ||