[llvm-commits] [vmkit] r50896 - in /vmkit/trunk: include/mvm/JIT.h lib/Mvm/JIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Fri May 9 03:34:15 PDT 2008
Author: geoffray
Date: Fri May 9 05:34:11 2008
New Revision: 50896
URL: http://llvm.org/viewvc/llvm-project?rev=50896&view=rev
Log:
Add a constantPtrSize LLVM Constant for getting the size of a pointer.
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=50896&r1=50895&r2=50896&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/JIT.h (original)
+++ vmkit/trunk/include/mvm/JIT.h Fri May 9 05:34:11 2008
@@ -143,6 +143,7 @@
extern llvm::ConstantFP* constantFloatMinusZero;
extern llvm::ConstantFP* constantDoubleMinusZero;
extern llvm::Constant* constantPtrNull;
+extern llvm::ConstantInt* constantPtrSize;
extern const llvm::PointerType* ptrType;
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=50896&r1=50895&r2=50896&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/JIT.cpp Fri May 9 05:34:11 2008
@@ -551,6 +551,7 @@
constantFloatMinusZero = ConstantFP::get(Type::FloatTy, -0.0f);
constantPtrNull = Constant::getNullValue(ptrType);
+ constantPtrSize = ConstantInt::get(Type::Int32Ty, sizeof(void*));
arrayPtrType = PointerType::getUnqual(ArrayType::get(Type::Int8Ty, 0));
mvm::jit::protectEngine = mvm::Lock::allocNormal();
@@ -642,6 +643,7 @@
llvm::ConstantFP* mvm::jit::constantFloatMinusZero;
llvm::ConstantFP* mvm::jit::constantDoubleMinusZero;
llvm::Constant* mvm::jit::constantPtrNull;
+llvm::ConstantInt* mvm::jit::constantPtrSize;
const llvm::PointerType* mvm::jit::ptrType;
const llvm::Type* mvm::jit::arrayPtrType;
More information about the llvm-commits
mailing list