[vmkit-commits] [vmkit] r61704 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon Jan 5 09:28:55 PST 2009
Author: geoffray
Date: Mon Jan 5 11:28:55 2009
New Revision: 61704
URL: http://llvm.org/viewvc/llvm-project?rev=61704&view=rev
Log:
Do not reference abstract methods.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=61704&r1=61703&r2=61704&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon Jan 5 11:28:55 2009
@@ -847,10 +847,14 @@
MethodElts.push_back(ConstantInt::get(Type::Int8Ty, method.canBeInlined));
// code
- LLVMMethodInfo* LMI = getMethodInfo(&method);
- Function* func = LMI->getMethod();
- MethodElts.push_back(ConstantExpr::getCast(Instruction::BitCast, func,
- ptrType));
+ if (isAbstract(method.access)) {
+ MethodElts.push_back(Constant::getNullValue(ptrType));
+ } else {
+ LLVMMethodInfo* LMI = getMethodInfo(&method);
+ Function* func = LMI->getMethod();
+ MethodElts.push_back(ConstantExpr::getCast(Instruction::BitCast, func,
+ ptrType));
+ }
// offset
MethodElts.push_back(ConstantInt::get(Type::Int32Ty, method.offset));
More information about the vmkit-commits
mailing list