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 | 2b827fd70d584967fc15501efae0ca702fff7eff (patch) | |
| tree | 8c08948010f157ea3be97803708024c80d1834cd /llvm/lib/VMCore | |
| parent | 90e0b271df417c704e7b5b170a803bc0d84c2e5e (diff) | |
| download | bcm5719-llvm-2b827fd70d584967fc15501efae0ca702fff7eff.tar.gz bcm5719-llvm-2b827fd70d584967fc15501efae0ca702fff7eff.zip | |
avoid an APFloat copy.
llvm-svn: 42979
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 485b42863b2..da7e768d720 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/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, |

