Mercurial > projects > ldc
diff gen/toir.cpp @ 137:ce7b81fb957f trunk
[svn r141] fixed more problems with classinfo
moved more IR state out of the AST classes
author | lindquist |
---|---|
date | Fri, 18 Jan 2008 16:42:16 +0100 |
parents | 0e28624814e8 |
children | 336ec4f4bbb3 |
line wrap: on
line diff
--- a/gen/toir.cpp Thu Jan 17 03:15:12 2008 +0100 +++ b/gen/toir.cpp Fri Jan 18 16:42:16 2008 +0100 @@ -194,8 +194,8 @@ { Logger::println("ClassInfoDeclaration: %s", cid->cd->toChars()); DtoDeclareClassInfo(cid->cd); - assert(cid->cd->llvmClass); - return new DVarValue(vd, cid->cd->llvmClass, true); + assert(cid->cd->irStruct->classInfo); + return new DVarValue(vd, cid->cd->irStruct->classInfo, true); } // nested variable else if (vd->nestedref) { @@ -247,8 +247,8 @@ assert(sdecltype->ty == Tstruct); TypeStruct* ts = (TypeStruct*)sdecltype; assert(ts->sym); - assert(ts->sym->llvmInit); - return new DVarValue(type, ts->sym->llvmInit, true); + assert(ts->sym->irStruct->init); + return new DVarValue(type, ts->sym->irStruct->init, true); } else { @@ -272,8 +272,8 @@ assert(sdecltype->ty == Tstruct); TypeStruct* ts = (TypeStruct*)sdecltype; DtoForceConstInitDsymbol(ts->sym); - assert(ts->sym->llvmConstInit); - return ts->sym->llvmConstInit; + assert(ts->sym->irStruct->constInit); + return ts->sym->irStruct->constInit; } else if (TypeInfoDeclaration* ti = var->isTypeInfoDeclaration()) { @@ -1068,8 +1068,8 @@ } // build type info array - assert(Type::typeinfo->llvmConstInit); - const llvm::Type* typeinfotype = getPtrToType(Type::typeinfo->llvmConstInit->getType()); + assert(Type::typeinfo->irStruct->constInit); + const llvm::Type* typeinfotype = getPtrToType(Type::typeinfo->irStruct->constInit->getType()); Logger::cout() << "typeinfo ptr type: " << *typeinfotype << '\n'; const llvm::ArrayType* typeinfoarraytype = llvm::ArrayType::get(typeinfotype,vtype->getNumElements()); @@ -1907,7 +1907,7 @@ } else { assert(ts->sym); - DtoStructCopy(emem,ts->sym->llvmInit); + DtoStructCopy(emem,ts->sym->irStruct->init); } } @@ -2585,7 +2585,7 @@ unsigned n = elements->dim; // unions might have different types for each literal - if (sd->llvmHasUnions) { + if (sd->irStruct->hasUnions) { // build the type of the literal std::vector<const llvm::Type*> tys; for (unsigned i=0; i<n; ++i) {