diff options
| author | Micah Villmow <villmow@gmail.com> | 2012-10-08 16:38:25 +0000 |
|---|---|---|
| committer | Micah Villmow <villmow@gmail.com> | 2012-10-08 16:38:25 +0000 |
| commit | cdfe20b97f55f4f493ebd6f15932780ae0789fe4 (patch) | |
| tree | 8e7f0bdb8bdc055ac83804ed3853eb5d33c08f3c /llvm/lib/ExecutionEngine/Interpreter | |
| parent | 6bf5825b3da245596605f3918397ffc18c8d1a49 (diff) | |
| download | bcm5719-llvm-cdfe20b97f55f4f493ebd6f15932780ae0789fe4.tar.gz bcm5719-llvm-cdfe20b97f55f4f493ebd6f15932780ae0789fe4.zip | |
Move TargetData to DataLayout.
llvm-svn: 165402
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Interpreter.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 7a206ebf73d..e16e2d112a9 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -25,7 +25,7 @@ #include "llvm/Config/config.h" // Detect libffi #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/DynamicLibrary.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Mutex.h" #include <csignal> @@ -180,7 +180,7 @@ static void *ffiValueFor(Type *Ty, const GenericValue &AV, static bool ffiInvoke(RawFunc Fn, Function *F, const std::vector<GenericValue> &ArgVals, - const TargetData *TD, GenericValue &Result) { + const DataLayout *TD, GenericValue &Result) { ffi_cif cif; FunctionType *FTy = F->getFunctionType(); const unsigned NumArgs = F->arg_size(); @@ -276,7 +276,7 @@ GenericValue Interpreter::callExternalFunction(Function *F, FunctionsLock->release(); GenericValue Result; - if (RawFn != 0 && ffiInvoke(RawFn, F, ArgVals, getTargetData(), Result)) + if (RawFn != 0 && ffiInvoke(RawFn, F, ArgVals, getDataLayout(), Result)) return Result; #endif // USE_LIBFFI @@ -376,7 +376,7 @@ GenericValue lle_X_sprintf(FunctionType *FT, case 'x': case 'X': if (HowLong >= 1) { if (HowLong == 1 && - TheInterpreter->getTargetData()->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. diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp index 43e34533c7b..55152dbbea1 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp @@ -48,7 +48,7 @@ Interpreter::Interpreter(Module *M) : ExecutionEngine(M), TD(M) { memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped)); - setTargetData(&TD); + setDataLayout(&TD); // Initialize the "backend" initializeExecutionEngine(); initializeExternalFunctions(); diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h index 28c5775ab46..72c42c15db3 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -17,7 +17,7 @@ #include "llvm/Function.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/ErrorHandling.h" @@ -82,7 +82,7 @@ struct ExecutionContext { // class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> { GenericValue ExitValue; // The return value of the called function - TargetData TD; + DataLayout TD; IntrinsicLowering *IL; // The runtime stack of executing code. The top of the stack is the current |

