[vmkit-commits] [vmkit] r88924 - in /vmkit/trunk: include/mvm/JIT.h lib/Mvm/Compiler/JIT.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Nov 16 09:32:13 PST 2009


Author: geoffray
Date: Mon Nov 16 11:32:13 2009
New Revision: 88924

URL: http://llvm.org/viewvc/llvm-project?rev=88924&view=rev
Log:
Add an identifier for LLVM metadata representing high-level types.


Modified:
    vmkit/trunk/include/mvm/JIT.h
    vmkit/trunk/lib/Mvm/Compiler/JIT.cpp

Modified: vmkit/trunk/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/JIT.h?rev=88924&r1=88923&r2=88924&view=diff

==============================================================================
--- vmkit/trunk/include/mvm/JIT.h (original)
+++ vmkit/trunk/include/mvm/JIT.h Mon Nov 16 11:32:13 2009
@@ -185,6 +185,7 @@
    static llvm::FunctionPassManager* globalFunctionPasses;
    static const llvm::TargetData* TheTargetData;
    static mvm::BumpPtrAllocator* Allocator;
+   static unsigned MetadataTypeKind;
 
    static uint64 getTypeSize(const llvm::Type* type);
    static void runPasses(llvm::Function* func, llvm::FunctionPassManager*);

Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=88924&r1=88923&r2=88924&view=diff

==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Mon Nov 16 11:32:13 2009
@@ -147,6 +147,7 @@
   mvm::llvm_runtime::makeLLVMModuleContents(globalModule);
   
   LLVMContext& Context = globalModule->getContext();
+  MetadataTypeKind = Context.getMetadata().registerMDKind("HighLevelType");
   // Type declaration
   ptrType = PointerType::getUnqual(Type::getInt8Ty(Context));
   ptr32Type = PointerType::getUnqual(Type::getInt32Ty(Context));
@@ -449,6 +450,7 @@
 llvm::ExecutionEngine* MvmModule::executionEngine;
 mvm::LockRecursive MvmModule::protectEngine;
 mvm::BumpPtrAllocator* MvmModule::Allocator;
+unsigned MvmModule::MetadataTypeKind;
 
 uint64 MvmModule::getTypeSize(const llvm::Type* type) {
   return TheTargetData->getTypeAllocSize(type);





More information about the vmkit-commits mailing list