[llvm-commits] [vmkit] r51029 - in /vmkit/trunk: include/mvm/JIT.h lib/Mvm/JIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue May 13 02:28:47 PDT 2008
Author: geoffray
Date: Tue May 13 04:28:46 2008
New Revision: 51029
URL: http://llvm.org/viewvc/llvm-project?rev=51029&view=rev
Log:
Set the data layout of the main LLVM module.
Create new global types.
Modified:
vmkit/trunk/include/mvm/JIT.h
vmkit/trunk/lib/Mvm/JIT.cpp
Modified: vmkit/trunk/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/JIT.h?rev=51029&r1=51028&r2=51029&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/JIT.h (original)
+++ vmkit/trunk/include/mvm/JIT.h Tue May 13 04:28:46 2008
@@ -145,6 +145,8 @@
extern llvm::Constant* constantPtrNull;
extern llvm::ConstantInt* constantPtrSize;
extern const llvm::PointerType* ptrType;
+extern const llvm::PointerType* ptr32Type;
+extern const llvm::PointerType* ptrPtrType;
extern const llvm::Type* arrayPtrType;
Modified: vmkit/trunk/lib/Mvm/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/JIT.cpp?rev=51029&r1=51028&r2=51029&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/JIT.cpp Tue May 13 04:28:46 2008
@@ -228,8 +228,11 @@
executionEngine = llvm::ExecutionEngine::createJIT(jit::globalModuleProvider, 0, jit::memoryManager);
executionEngine->InstallExceptionTableRegister(__register_frame);
-
+ module->setDataLayout(mvm::jit::executionEngine->getTargetData()->getStringRepresentation());
+
ptrType = PointerType::getUnqual(Type::Int8Ty);
+ ptr32Type = PointerType::getUnqual(Type::Int32Ty);
+ ptrPtrType = PointerType::getUnqual(ptrType);
{
std::vector<const llvm::Type *> arg_types;
@@ -645,6 +648,8 @@
llvm::Constant* mvm::jit::constantPtrNull;
llvm::ConstantInt* mvm::jit::constantPtrSize;
const llvm::PointerType* mvm::jit::ptrType;
+const llvm::PointerType* mvm::jit::ptr32Type;
+const llvm::PointerType* mvm::jit::ptrPtrType;
const llvm::Type* mvm::jit::arrayPtrType;
llvm::Module *mvm::jit::globalModule;
More information about the llvm-commits
mailing list