aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-20 14:40:12 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-20 14:40:12 +0000
commit00b34996b49748045e2dd77e4f7ca60c258639e2 (patch)
treeda5c6c08879b6d2d2f1f2f8022248250ba4b9950 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp
parent195f23c53bb09d266b18c24519cf9bd0589972a0 (diff)
downloadllvm-00b34996b49748045e2dd77e4f7ca60c258639e2.zip
llvm-00b34996b49748045e2dd77e4f7ca60c258639e2.tar.gz
llvm-00b34996b49748045e2dd77e4f7ca60c258639e2.tar.bz2
Use MutableArrayRef for APFloat::convertToInteger
As discussed on D31074, use MutableArrayRef for destination integer buffers to help assert before stack overflows happen. llvm-svn: 298253
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index ef7e350..2ee72f9 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/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?