mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-20 22:25:22 +02:00
Renamed IrStruct to IrAggr, as it is also used for classes.
The class-specific parts should probably be factored out.
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
#include "gen/structs.h"
|
#include "gen/structs.h"
|
||||||
#include "gen/tollvm.h"
|
#include "gen/tollvm.h"
|
||||||
#include "gen/utils.h"
|
#include "gen/utils.h"
|
||||||
#include "ir/irstruct.h"
|
#include "ir/iraggr.h"
|
||||||
#include "ir/irtypeclass.h"
|
#include "ir/irtypeclass.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -55,10 +55,10 @@ void DtoResolveClass(ClassDeclaration* cd)
|
|||||||
// make sure type exists
|
// make sure type exists
|
||||||
DtoType(cd->type);
|
DtoType(cd->type);
|
||||||
|
|
||||||
// create IrStruct
|
// create IrAggr
|
||||||
assert(cd->ir.irStruct == NULL);
|
assert(cd->ir.irStruct == NULL);
|
||||||
IrStruct* irstruct = new IrStruct(cd);
|
IrAggr* irAggr = new IrAggr(cd);
|
||||||
cd->ir.irStruct = irstruct;
|
cd->ir.irStruct = irAggr;
|
||||||
|
|
||||||
// make sure all fields really get their ir field
|
// make sure all fields really get their ir field
|
||||||
ArrayIter<VarDeclaration> it(cd->fields);
|
ArrayIter<VarDeclaration> it(cd->fields);
|
||||||
@@ -75,30 +75,30 @@ void DtoResolveClass(ClassDeclaration* cd)
|
|||||||
bool needs_def = mustDefineSymbol(cd);
|
bool needs_def = mustDefineSymbol(cd);
|
||||||
|
|
||||||
// emit the ClassZ symbol
|
// emit the ClassZ symbol
|
||||||
LLGlobalVariable* ClassZ = irstruct->getClassInfoSymbol();
|
LLGlobalVariable* ClassZ = irAggr->getClassInfoSymbol();
|
||||||
|
|
||||||
// emit the interfaceInfosZ symbol if necessary
|
// emit the interfaceInfosZ symbol if necessary
|
||||||
if (cd->vtblInterfaces && cd->vtblInterfaces->dim > 0)
|
if (cd->vtblInterfaces && cd->vtblInterfaces->dim > 0)
|
||||||
irstruct->getInterfaceArraySymbol(); // initializer is applied when it's built
|
irAggr->getInterfaceArraySymbol(); // initializer is applied when it's built
|
||||||
|
|
||||||
// interface only emit typeinfo and classinfo
|
// interface only emit typeinfo and classinfo
|
||||||
if (cd->isInterfaceDeclaration())
|
if (cd->isInterfaceDeclaration())
|
||||||
{
|
{
|
||||||
irstruct->initializeInterface();
|
irAggr->initializeInterface();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// emit the initZ symbol
|
// emit the initZ symbol
|
||||||
LLGlobalVariable* initZ = irstruct->getInitSymbol();
|
LLGlobalVariable* initZ = irAggr->getInitSymbol();
|
||||||
// emit the vtblZ symbol
|
// emit the vtblZ symbol
|
||||||
LLGlobalVariable* vtblZ = irstruct->getVtblSymbol();
|
LLGlobalVariable* vtblZ = irAggr->getVtblSymbol();
|
||||||
|
|
||||||
// perform definition
|
// perform definition
|
||||||
if (needs_def)
|
if (needs_def)
|
||||||
{
|
{
|
||||||
// set symbol initializers
|
// set symbol initializers
|
||||||
initZ->setInitializer(irstruct->getDefaultInit());
|
initZ->setInitializer(irAggr->getDefaultInit());
|
||||||
vtblZ->setInitializer(irstruct->getVtblInit());
|
vtblZ->setInitializer(irAggr->getVtblInit());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ void DtoResolveClass(ClassDeclaration* cd)
|
|||||||
DtoTypeInfoOf(cd->type);
|
DtoTypeInfoOf(cd->type);
|
||||||
|
|
||||||
// define classinfo
|
// define classinfo
|
||||||
ClassZ->setInitializer(irstruct->getClassInfoInit());
|
ClassZ->setInitializer(irAggr->getClassInfoInit());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,7 +689,7 @@ LLConstant* DtoDefineClassInfo(ClassDeclaration* cd)
|
|||||||
assert(cd->type->ty == Tclass);
|
assert(cd->type->ty == Tclass);
|
||||||
TypeClass* cdty = static_cast<TypeClass*>(cd->type);
|
TypeClass* cdty = static_cast<TypeClass*>(cd->type);
|
||||||
|
|
||||||
IrStruct* ir = cd->ir.irStruct;
|
IrAggr* ir = cd->ir.irStruct;
|
||||||
assert(ir);
|
assert(ir);
|
||||||
|
|
||||||
ClassDeclaration* cinfo = ClassDeclaration::classinfo;
|
ClassDeclaration* cinfo = ClassDeclaration::classinfo;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ llvm::Instruction* IRState::topallocapoint()
|
|||||||
return functions.back()->allocapoint;
|
return functions.back()->allocapoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
IrStruct* IRState::topstruct()
|
IrAggr* IRState::topstruct()
|
||||||
{
|
{
|
||||||
assert(!structs.empty() && "Struct vector is empty!");
|
assert(!structs.empty() && "Struct vector is empty!");
|
||||||
return structs.back();
|
return structs.back();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "aggregate.h"
|
#include "aggregate.h"
|
||||||
#include "root.h"
|
#include "root.h"
|
||||||
#include "ir/irfunction.h"
|
#include "ir/irfunction.h"
|
||||||
#include "ir/irstruct.h"
|
#include "ir/iraggr.h"
|
||||||
#include "ir/irvar.h"
|
#include "ir/irvar.h"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <list>
|
#include <list>
|
||||||
@@ -146,9 +146,9 @@ struct IRState
|
|||||||
llvm::Instruction* topallocapoint();
|
llvm::Instruction* topallocapoint();
|
||||||
|
|
||||||
// structs
|
// structs
|
||||||
typedef std::vector<IrStruct*> StructVector;
|
typedef std::vector<IrAggr*> StructVector;
|
||||||
StructVector structs;
|
StructVector structs;
|
||||||
IrStruct* topstruct();
|
IrAggr* topstruct();
|
||||||
|
|
||||||
// D main function
|
// D main function
|
||||||
bool emitMain;
|
bool emitMain;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "gen/llvm.h"
|
#include "gen/llvm.h"
|
||||||
#include "gen/llvmhelpers.h"
|
#include "gen/llvmhelpers.h"
|
||||||
#include "gen/tollvm.h"
|
#include "gen/tollvm.h"
|
||||||
#include "ir/irstruct.h"
|
#include "ir/iraggr.h"
|
||||||
|
|
||||||
RTTIBuilder::RTTIBuilder(AggregateDeclaration* base_class)
|
RTTIBuilder::RTTIBuilder(AggregateDeclaration* base_class)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ struct ClassDeclaration;
|
|||||||
struct Dsymbol;
|
struct Dsymbol;
|
||||||
struct FuncDeclaration;
|
struct FuncDeclaration;
|
||||||
struct IrGlobal;
|
struct IrGlobal;
|
||||||
struct IrStruct;
|
struct IrAggr;
|
||||||
struct Type;
|
struct Type;
|
||||||
struct TypeClass;
|
struct TypeClass;
|
||||||
namespace llvm { class StructType; }
|
namespace llvm { class StructType; }
|
||||||
@@ -36,7 +36,7 @@ struct RTTIBuilder
|
|||||||
{
|
{
|
||||||
AggregateDeclaration* base;
|
AggregateDeclaration* base;
|
||||||
TypeClass* basetype;
|
TypeClass* basetype;
|
||||||
IrStruct* baseir;
|
IrAggr* baseir;
|
||||||
|
|
||||||
// 10 is enough for any D1 TypeInfo
|
// 10 is enough for any D1 TypeInfo
|
||||||
// 14 is enough for any D1 ClassInfo
|
// 14 is enough for any D1 ClassInfo
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "gen/structs.h"
|
#include "gen/structs.h"
|
||||||
#include "gen/tollvm.h"
|
#include "gen/tollvm.h"
|
||||||
#include "gen/utils.h"
|
#include "gen/utils.h"
|
||||||
#include "ir/irstruct.h"
|
#include "ir/iraggr.h"
|
||||||
#include "ir/irtypestruct.h"
|
#include "ir/irtypestruct.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
@@ -45,8 +45,8 @@ void DtoResolveStruct(StructDeclaration* sd)
|
|||||||
if (sd->sizeok != 1)
|
if (sd->sizeok != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// create the IrStruct
|
// create the IrAggr
|
||||||
IrStruct* irstruct = new IrStruct(sd);
|
IrAggr* irstruct = new IrAggr(sd);
|
||||||
sd->ir.irStruct = irstruct;
|
sd->ir.irStruct = irstruct;
|
||||||
|
|
||||||
// Set up our field metadata.
|
// Set up our field metadata.
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ static llvm::DIType dwarfCompositeType(Type* type)
|
|||||||
if (sd->sizeok == 0)
|
if (sd->sizeok == 0)
|
||||||
return llvm::DICompositeType(NULL);
|
return llvm::DICompositeType(NULL);
|
||||||
|
|
||||||
IrStruct* ir = sd->ir.irStruct;
|
IrAggr* ir = sd->ir.irStruct;
|
||||||
assert(ir);
|
assert(ir);
|
||||||
if (static_cast<llvm::MDNode*>(ir->diCompositeType) != 0)
|
if (static_cast<llvm::MDNode*>(ir->diCompositeType) != 0)
|
||||||
return ir->diCompositeType;
|
return ir->diCompositeType;
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ void TypeInfoStructDeclaration::llvmDefine()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sd->codegen(Type::sir);
|
sd->codegen(Type::sir);
|
||||||
IrStruct* irstruct = sd->ir.irStruct;
|
IrAggr* irstruct = sd->ir.irStruct;
|
||||||
|
|
||||||
RTTIBuilder b(Type::typeinfostruct);
|
RTTIBuilder b(Type::typeinfostruct);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//===-- irstruct.cpp ------------------------------------------------------===//
|
//===-- iraggr.cpp --------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// LDC – the LLVM D compiler
|
// LDC – the LLVM D compiler
|
||||||
//
|
//
|
||||||
@@ -17,13 +17,13 @@
|
|||||||
#include "gen/logger.h"
|
#include "gen/logger.h"
|
||||||
#include "gen/tollvm.h"
|
#include "gen/tollvm.h"
|
||||||
#include "gen/utils.h"
|
#include "gen/utils.h"
|
||||||
#include "ir/irstruct.h"
|
#include "ir/iraggr.h"
|
||||||
#include "ir/irtypeclass.h"
|
#include "ir/irtypeclass.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
IrStruct::IrStruct(AggregateDeclaration* aggr)
|
IrAggr::IrAggr(AggregateDeclaration* aggr)
|
||||||
: diCompositeType(NULL),
|
: diCompositeType(NULL),
|
||||||
init_type(LLStructType::create(gIR->context(), std::string(aggr->toPrettyChars()) + "_init"))
|
init_type(LLStructType::create(gIR->context(), std::string(aggr->toPrettyChars()) + "_init"))
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ IrStruct::IrStruct(AggregateDeclaration* aggr)
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLGlobalVariable * IrStruct::getInitSymbol()
|
LLGlobalVariable * IrAggr::getInitSymbol()
|
||||||
{
|
{
|
||||||
if (init)
|
if (init)
|
||||||
return init;
|
return init;
|
||||||
@@ -76,7 +76,7 @@ LLGlobalVariable * IrStruct::getInitSymbol()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
llvm::Constant * IrStruct::getDefaultInit()
|
llvm::Constant * IrAggr::getDefaultInit()
|
||||||
{
|
{
|
||||||
if (constInit)
|
if (constInit)
|
||||||
return constInit;
|
return constInit;
|
||||||
@@ -158,7 +158,7 @@ size_t add_zeros(std::vector<llvm::Constant*>& constants, size_t diff)
|
|||||||
// Matches the way the type is built in IrTypeStruct
|
// Matches the way the type is built in IrTypeStruct
|
||||||
// maybe look at unifying the interface.
|
// maybe look at unifying the interface.
|
||||||
|
|
||||||
std::vector<llvm::Constant*> IrStruct::createStructDefaultInitializer()
|
std::vector<llvm::Constant*> IrAggr::createStructDefaultInitializer()
|
||||||
{
|
{
|
||||||
IF_LOG Logger::println("Building default initializer for %s", aggrdecl->toPrettyChars());
|
IF_LOG Logger::println("Building default initializer for %s", aggrdecl->toPrettyChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
@@ -218,7 +218,7 @@ std::vector<llvm::Constant*> IrStruct::createStructDefaultInitializer()
|
|||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLConstant * IrStruct::createStructInitializer(StructInitializer * si)
|
LLConstant * IrAggr::createStructInitializer(StructInitializer * si)
|
||||||
{
|
{
|
||||||
IF_LOG Logger::println("Building StructInitializer of type %s", si->ad->toPrettyChars());
|
IF_LOG Logger::println("Building StructInitializer of type %s", si->ad->toPrettyChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
//===-- ir/irstruct.h - Codegen state for D aggregates ----------*- C++ -*-===//
|
//===-- ir/iraggr.h - Codegen state for D aggregates ------------*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// LDC – the LLVM D compiler
|
// LDC – the LLVM D compiler
|
||||||
//
|
//
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LDC_IR_IRSTRUCT_H
|
#ifndef LDC_IR_IRAGGR_H
|
||||||
#define LDC_IR_IRSTRUCT_H
|
#define LDC_IR_IRAGGR_H
|
||||||
|
|
||||||
#include "ir/ir.h"
|
#include "ir/ir.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -26,10 +26,10 @@ struct StructInitializer;
|
|||||||
|
|
||||||
// represents a struct or class
|
// represents a struct or class
|
||||||
// it is used during codegen to hold all the vital info we need
|
// it is used during codegen to hold all the vital info we need
|
||||||
struct IrStruct
|
struct IrAggr
|
||||||
{
|
{
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
IrStruct(AggregateDeclaration* agg);
|
IrAggr(AggregateDeclaration* agg);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// public fields,
|
// public fields,
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
#include "gen/metadata.h"
|
#include "gen/metadata.h"
|
||||||
#include "gen/runtime.h"
|
#include "gen/runtime.h"
|
||||||
|
|
||||||
#include "ir/irstruct.h"
|
#include "ir/iraggr.h"
|
||||||
#include "ir/irtypeclass.h"
|
#include "ir/irtypeclass.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -41,7 +41,7 @@ extern LLConstant* DtoDefineClassInfo(ClassDeclaration* cd);
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLGlobalVariable * IrStruct::getVtblSymbol()
|
LLGlobalVariable * IrAggr::getVtblSymbol()
|
||||||
{
|
{
|
||||||
if (vtbl)
|
if (vtbl)
|
||||||
return vtbl;
|
return vtbl;
|
||||||
@@ -63,7 +63,7 @@ LLGlobalVariable * IrStruct::getVtblSymbol()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLGlobalVariable * IrStruct::getClassInfoSymbol()
|
LLGlobalVariable * IrAggr::getClassInfoSymbol()
|
||||||
{
|
{
|
||||||
if (classInfo)
|
if (classInfo)
|
||||||
return classInfo;
|
return classInfo;
|
||||||
@@ -114,7 +114,7 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLGlobalVariable * IrStruct::getInterfaceArraySymbol()
|
LLGlobalVariable * IrAggr::getInterfaceArraySymbol()
|
||||||
{
|
{
|
||||||
if (classInterfacesArray)
|
if (classInterfacesArray)
|
||||||
return classInterfacesArray;
|
return classInterfacesArray;
|
||||||
@@ -145,7 +145,7 @@ LLGlobalVariable * IrStruct::getInterfaceArraySymbol()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLConstant * IrStruct::getVtblInit()
|
LLConstant * IrAggr::getVtblInit()
|
||||||
{
|
{
|
||||||
if (constVtbl)
|
if (constVtbl)
|
||||||
return constVtbl;
|
return constVtbl;
|
||||||
@@ -253,7 +253,7 @@ LLConstant * IrStruct::getVtblInit()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLConstant * IrStruct::getClassInfoInit()
|
LLConstant * IrAggr::getClassInfoInit()
|
||||||
{
|
{
|
||||||
if (constClassInfo)
|
if (constClassInfo)
|
||||||
return constClassInfo;
|
return constClassInfo;
|
||||||
@@ -263,7 +263,7 @@ LLConstant * IrStruct::getClassInfoInit()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void IrStruct::addBaseClassInits(
|
void IrAggr::addBaseClassInits(
|
||||||
std::vector<llvm::Constant*>& constants,
|
std::vector<llvm::Constant*>& constants,
|
||||||
ClassDeclaration* base,
|
ClassDeclaration* base,
|
||||||
size_t& offset,
|
size_t& offset,
|
||||||
@@ -330,7 +330,7 @@ void IrStruct::addBaseClassInits(
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
std::vector<llvm::Constant*> IrStruct::createClassDefaultInitializer()
|
std::vector<llvm::Constant*> IrAggr::createClassDefaultInitializer()
|
||||||
{
|
{
|
||||||
ClassDeclaration* cd = aggrdecl->isClassDeclaration();
|
ClassDeclaration* cd = aggrdecl->isClassDeclaration();
|
||||||
assert(cd && "invalid class aggregate");
|
assert(cd && "invalid class aggregate");
|
||||||
@@ -366,7 +366,7 @@ std::vector<llvm::Constant*> IrStruct::createClassDefaultInitializer()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
llvm::GlobalVariable * IrStruct::getInterfaceVtbl(BaseClass * b, bool new_instance, size_t interfaces_index)
|
llvm::GlobalVariable * IrAggr::getInterfaceVtbl(BaseClass * b, bool new_instance, size_t interfaces_index)
|
||||||
{
|
{
|
||||||
ClassGlobalMap::iterator it = interfaceVtblMap.find(b->base);
|
ClassGlobalMap::iterator it = interfaceVtblMap.find(b->base);
|
||||||
if (it != interfaceVtblMap.end())
|
if (it != interfaceVtblMap.end())
|
||||||
@@ -454,7 +454,7 @@ llvm::GlobalVariable * IrStruct::getInterfaceVtbl(BaseClass * b, bool new_instan
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
LLConstant * IrStruct::getClassInfoInterfaces()
|
LLConstant * IrAggr::getClassInfoInterfaces()
|
||||||
{
|
{
|
||||||
IF_LOG Logger::println("Building ClassInfo.interfaces");
|
IF_LOG Logger::println("Building ClassInfo.interfaces");
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
@@ -496,7 +496,7 @@ LLConstant * IrStruct::getClassInfoInterfaces()
|
|||||||
|
|
||||||
IF_LOG Logger::println("Adding interface %s", it->base->toPrettyChars());
|
IF_LOG Logger::println("Adding interface %s", it->base->toPrettyChars());
|
||||||
|
|
||||||
IrStruct* irinter = it->base->ir.irStruct;
|
IrAggr* irinter = it->base->ir.irStruct;
|
||||||
assert(irinter && "interface has null IrStruct");
|
assert(irinter && "interface has null IrStruct");
|
||||||
IrTypeClass* itc = stripModifiers(irinter->type)->irtype->isClass();
|
IrTypeClass* itc = stripModifiers(irinter->type)->irtype->isClass();
|
||||||
assert(itc && "null interface IrTypeClass");
|
assert(itc && "null interface IrTypeClass");
|
||||||
@@ -559,7 +559,7 @@ LLConstant * IrStruct::getClassInfoInterfaces()
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void IrStruct::initializeInterface()
|
void IrAggr::initializeInterface()
|
||||||
{
|
{
|
||||||
InterfaceDeclaration* base = aggrdecl->isInterfaceDeclaration();
|
InterfaceDeclaration* base = aggrdecl->isInterfaceDeclaration();
|
||||||
assert(base && "not interface");
|
assert(base && "not interface");
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
struct IrModule;
|
struct IrModule;
|
||||||
struct IrFunction;
|
struct IrFunction;
|
||||||
struct IrStruct;
|
struct IrAggr;
|
||||||
struct IrGlobal;
|
struct IrGlobal;
|
||||||
struct IrLocal;
|
struct IrLocal;
|
||||||
struct IrParameter;
|
struct IrParameter;
|
||||||
@@ -52,7 +52,7 @@ struct IrDsymbol
|
|||||||
|
|
||||||
IrModule* irModule;
|
IrModule* irModule;
|
||||||
|
|
||||||
IrStruct* irStruct;
|
IrAggr* irStruct;
|
||||||
|
|
||||||
IrFunction* irFunc;
|
IrFunction* irFunc;
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class IrTypeVector;
|
|||||||
/// easily check for uniqueness violations in the face of forward references.
|
/// easily check for uniqueness violations in the face of forward references.
|
||||||
/// TODO: Implement the described changes (now that the forward reference
|
/// TODO: Implement the described changes (now that the forward reference
|
||||||
/// handling logic seems to work correctly) and get rid of the "no-op" DtoType
|
/// handling logic seems to work correctly) and get rid of the "no-op" DtoType
|
||||||
/// calls in IrStruct, ... that only exist for their side effect.
|
/// calls in IrAggr, ... that only exist for their side effect.
|
||||||
class IrType
|
class IrType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user