diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-03-20 14:40:12 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-03-20 14:40:12 +0000 |
commit | 957caa243d9270df37a566aedae3f1244e7b62ef (patch) | |
tree | 7eebf414855cf95dbb1b7f255af7b803eb531083 /lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | c94df81328557b85ba7897c6d5aa52b6ff470c2d (diff) | |
download | llvm-957caa243d9270df37a566aedae3f1244e7b62ef.tar.gz |
Use MutableArrayRef for APFloat::convertToInteger
As discussed on D31074, use MutableArrayRef for destination integer buffers to help assert before stack overflows happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index ef7e3508964a..2ee72f9a8c16 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -727,7 +727,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { APFloat apf = APFloat(APFloat::x87DoubleExtended(), GV.IntVal); uint64_t v; bool ignored; - (void)apf.convertToInteger(&v, BitWidth, + (void)apf.convertToInteger(makeMutableArrayRef(v), BitWidth, CE->getOpcode()==Instruction::FPToSI, APFloat::rmTowardZero, &ignored); GV.IntVal = v; // endian? |