mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 14:53:14 +01:00
Refactored IrType construction to use static get() method.
This also allows us to enable the assert in IrType::IrType. Unfortunately, this is mostly a "peace of mind" commit, there doesn't seem to have been a bug actually caused by the transitory duplicate IrTypePointer/IrTypeStruct instances. The remaining xyz2llvm static methods are not exactly pretty, they should probably just be folded into get.
This commit is contained in:
@@ -22,14 +22,11 @@ class IrTypeClass : public IrTypeAggr
|
||||
{
|
||||
public:
|
||||
///
|
||||
IrTypeClass(ClassDeclaration* cd);
|
||||
static IrTypeClass* get(ClassDeclaration* cd);
|
||||
|
||||
///
|
||||
virtual IrTypeClass* isClass() { return this; }
|
||||
|
||||
///
|
||||
llvm::Type* buildType();
|
||||
|
||||
///
|
||||
llvm::Type* getLLType();
|
||||
|
||||
@@ -53,6 +50,9 @@ public:
|
||||
unsigned getNumInterfaceVtbls() { return num_interface_vtbls; }
|
||||
|
||||
protected:
|
||||
///
|
||||
IrTypeClass(ClassDeclaration* cd);
|
||||
|
||||
///
|
||||
ClassDeclaration* cd;
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user