summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-16 16:34:23 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-16 16:34:23 +0000
commita3fcefb66e8ed3dc45ab05b8e7983e9232606ac0 (patch)
tree4bf2eecbb623e76049d4355c47c35ee29b4c867d /llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
parentf14af1621942f084a05a772f1e7d06636c0293f3 (diff)
downloadbcm5719-llvm-a3fcefb66e8ed3dc45ab05b8e7983e9232606ac0.tar.gz
bcm5719-llvm-a3fcefb66e8ed3dc45ab05b8e7983e9232606ac0.zip
Make ExecutionEngine owning a DataLayout
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. The ExecutionEngine will act as an exception and will be unsafe to be reused across context. We don't enforce this rule but undefined behavior can occurs if the user tries to do it. Reviewers: lhames Subscribers: echristo, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11110 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242414
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 9b44042d614..5411182f291 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -178,7 +178,7 @@ static void *ffiValueFor(Type *Ty, const GenericValue &AV,
}
static bool ffiInvoke(RawFunc Fn, Function *F, ArrayRef<GenericValue> ArgVals,
- const DataLayout *TD, GenericValue &Result) {
+ const DataLayout &TD, GenericValue &Result) {
ffi_cif cif;
FunctionType *FTy = F->getFunctionType();
const unsigned NumArgs = F->arg_size();
@@ -368,7 +368,7 @@ static GenericValue lle_X_sprintf(FunctionType *FT,
case 'x': case 'X':
if (HowLong >= 1) {
if (HowLong == 1 &&
- TheInterpreter->getDataLayout()->getPointerSizeInBits() == 64 &&
+ TheInterpreter->getDataLayout().getPointerSizeInBits() == 64 &&
sizeof(long) < sizeof(int64_t)) {
// Make sure we use %lld with a 64 bit argument because we might be
// compiling LLI on a 32 bit compiler.
OpenPOWER on IntegriCloud