Rename APFloat::convertToAPInt to bitcastToAPInt to

make it clearer what the function does.  No functional
change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2008-10-09 18:53:47 +00:00
parent a6bf66d0d6
commit 7111b02c73
15 changed files with 51 additions and 50 deletions

View File

@@ -738,7 +738,7 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV,
else
assert(0 && "Unsupported floating point type");
// api needed to prevent premature destruction
APInt api = CFP->getValueAPF().convertToAPInt();
APInt api = CFP->getValueAPF().bitcastToAPInt();
const uint64_t* p = api.getRawData();
uint64_t word = *p;
int shiftcount=60;

View File

@@ -160,10 +160,10 @@ static Constant *FoldBitCast(Constant *V, const Type *DestTy) {
if (const ConstantFP *FP = dyn_cast<ConstantFP>(V)) {
// FP -> Integral.
if (DestTy == Type::Int32Ty) {
return ConstantInt::get(FP->getValueAPF().convertToAPInt());
return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
} else {
assert(DestTy == Type::Int64Ty && "only support f32/f64 for now!");
return ConstantInt::get(FP->getValueAPF().convertToAPInt());
return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
}
}
return 0;