[llvm-commits] [vmkit] r50529 - /vmkit/trunk/lib/N3/VMCore/VMClass.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu May 1 10:45:31 PDT 2008
Author: geoffray
Date: Thu May 1 12:45:31 2008
New Revision: 50529
URL: http://llvm.org/viewvc/llvm-project?rev=50529&view=rev
Log:
Do not get the forwarded type, use the actual type when available.
Modified:
vmkit/trunk/lib/N3/VMCore/VMClass.cpp
Modified: vmkit/trunk/lib/N3/VMCore/VMClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMClass.cpp?rev=50529&r1=50528&r2=50529&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/VMClass.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/VMClass.cpp Thu May 1 12:45:31 2008
@@ -384,16 +384,18 @@
arrayFields.push_back(VMObject::llvmType->getContainedType(0));
arrayFields.push_back(llvm::Type::Int32Ty);
arrayFields.push_back(llvm::ArrayType::get(baseClass->naturalType, 0));
- ((llvm::OpaqueType*)naturalType)->refineAbstractTypeTo(llvm::PointerType::getUnqual(llvm::StructType::get(arrayFields, false)));
- naturalType = naturalType->getForwardedType();
+ const llvm::Type* type = llvm::PointerType::getUnqual(llvm::StructType::get(arrayFields, false));
+ ((llvm::OpaqueType*)naturalType)->refineAbstractTypeTo(type);
+ naturalType = type;
virtualType = naturalType;
arrayVT = CLIJit::makeArrayVT(this);
}
void VMClassPointer::makeType() {
const llvm::Type* type = (baseClass->naturalType == llvm::Type::VoidTy) ? llvm::Type::Int8Ty : baseClass->naturalType;
- ((llvm::OpaqueType*)naturalType)->refineAbstractTypeTo(llvm::PointerType::getUnqual(type));
- naturalType = naturalType->getForwardedType();
+ const llvm::Type* pType = llvm::PointerType::getUnqual(type);
+ ((llvm::OpaqueType*)naturalType)->refineAbstractTypeTo(pType);
+ naturalType = pType;
}
void VMCommonClass::resolveType(bool stat, bool clinit) {
More information about the llvm-commits
mailing list