aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/JIT/JIT.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-08 16:38:25 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-08 16:38:25 +0000
commit3574eca1b02600bac4e625297f4ecf745f4c4f32 (patch)
tree197d30c8bd3a1505b260b9d2ead2b4d778ecbe9e /lib/ExecutionEngine/JIT/JIT.cpp
parent2b4b44e0d2e95fc695eafcc4d192fe1ae261e01e (diff)
downloadexternal_llvm-3574eca1b02600bac4e625297f4ecf745f4c4f32.zip
external_llvm-3574eca1b02600bac4e625297f4ecf745f4c4f32.tar.gz
external_llvm-3574eca1b02600bac4e625297f4ecf745f4c4f32.tar.bz2
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 97995ad..1ad3382 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -24,7 +24,7 @@
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/JITMemoryManager.h"
-#include "llvm/Target/TargetData.h"
+#include "llvm/DataLayout.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetJITInfo.h"
#include "llvm/Support/Dwarf.h"
@@ -272,7 +272,7 @@ JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji,
: ExecutionEngine(M), TM(tm), TJI(tji),
JMM(jmm ? jmm : JITMemoryManager::CreateDefaultMemManager()),
AllocateGVsWithCode(GVsWithCode), isAlreadyCodeGenerating(false) {
- setTargetData(TM.getTargetData());
+ setDataLayout(TM.getDataLayout());
jitstate = new JITState(M);
@@ -285,7 +285,7 @@ JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji,
// Add target data
MutexGuard locked(lock);
FunctionPassManager &PM = jitstate->getPM(locked);
- PM.add(new TargetData(*TM.getTargetData()));
+ PM.add(new DataLayout(*TM.getDataLayout()));
// Turn the machine code intermediate representation into bytes in memory that
// may be executed.
@@ -339,7 +339,7 @@ void JIT::addModule(Module *M) {
jitstate = new JITState(M);
FunctionPassManager &PM = jitstate->getPM(locked);
- PM.add(new TargetData(*TM.getTargetData()));
+ PM.add(new DataLayout(*TM.getDataLayout()));
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
@@ -370,7 +370,7 @@ bool JIT::removeModule(Module *M) {
jitstate = new JITState(Modules[0]);
FunctionPassManager &PM = jitstate->getPM(locked);
- PM.add(new TargetData(*TM.getTargetData()));
+ PM.add(new DataLayout(*TM.getDataLayout()));
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
@@ -815,8 +815,8 @@ char* JIT::getMemoryForGV(const GlobalVariable* GV) {
// through the memory manager which puts them near the code but not in the
// same buffer.
Type *GlobalType = GV->getType()->getElementType();
- size_t S = getTargetData()->getTypeAllocSize(GlobalType);
- size_t A = getTargetData()->getPreferredAlignment(GV);
+ size_t S = getDataLayout()->getTypeAllocSize(GlobalType);
+ size_t A = getDataLayout()->getPreferredAlignment(GV);
if (GV->isThreadLocal()) {
MutexGuard locked(lock);
Ptr = TJI.allocateThreadLocalMemory(S);