diff options
author | Chris Lattner <sabre@nondot.org> | 2007-10-15 05:34:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-10-15 05:34:10 +0000 |
commit | 3cab1c72b54cceaf2a4275dabf1b4160765820fc (patch) | |
tree | 57992ec6af7c917a418245a5566a5a814f8b0849 /lib/VMCore/ConstantFold.cpp | |
parent | 59afba0fe997c9f65abd66a4c3902ee2064abc4b (diff) | |
download | external_llvm-3cab1c72b54cceaf2a4275dabf1b4160765820fc.zip external_llvm-3cab1c72b54cceaf2a4275dabf1b4160765820fc.tar.gz external_llvm-3cab1c72b54cceaf2a4275dabf1b4160765820fc.tar.bz2 |
avoid an APFloat copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 485b428..da7e768 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -194,7 +194,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V, case Instruction::FPToUI: case Instruction::FPToSI: if (const ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { - APFloat V = FPC->getValueAPF(); + const APFloat &V = FPC->getValueAPF(); uint64_t x[2]; uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth(); (void) V.convertToInteger(x, DestBitWidth, opc==Instruction::FPToSI, |