diff options
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index c3186f69a5c..4f4f4688d61 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -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; diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 93cfccf1f5e..92561096d5d 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/lib/VMCore/ConstantFold.cpp @@ -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; |

