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 | f08f0f287cb26215bde8744680b57174d4184fed (patch) | |
tree | 57992ec6af7c917a418245a5566a5a814f8b0849 /lib/VMCore/ConstantFold.cpp | |
parent | 7271a2d49ee103d63154bc87d5b921213d50cd0b (diff) | |
download | external_llvm-f08f0f287cb26215bde8744680b57174d4184fed.tar.gz external_llvm-f08f0f287cb26215bde8744680b57174d4184fed.tar.bz2 external_llvm-f08f0f287cb26215bde8744680b57174d4184fed.zip |
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 485b42863b..da7e768d72 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, |