mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user