From 3cab1c72b54cceaf2a4275dabf1b4160765820fc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 15 Oct 2007 05:34:10 +0000 Subject: [PATCH] avoid an APFloat copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42979 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/ConstantFold.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 485b42863b2..da7e768d720 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(V)) { - APFloat V = FPC->getValueAPF(); + const APFloat &V = FPC->getValueAPF(); uint64_t x[2]; uint32_t DestBitWidth = cast(DestTy)->getBitWidth(); (void) V.convertToInteger(x, DestBitWidth, opc==Instruction::FPToSI, -- 2.34.1