view ir/irtypestruct.h @ 1256:6af2359b433a

Change needed for mingw
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Wed, 22 Apr 2009 14:40:56 -0600
parents 79758fd2f48a
children ec1d9dc1d32a
line wrap: on
line source

#ifndef __LDC_IR_IRTYPESTRUCT_H__
#define __LDC_IR_IRTYPESTRUCT_H__

#include "ir/irtype.h"

//////////////////////////////////////////////////////////////////////////////

struct AggregateDeclaration;
struct StructDeclaration;
struct TypeStruct;

//////////////////////////////////////////////////////////////////////////////

class IrTypeAggr : public IrType
{
public:
    ///
    IrTypeAggr(AggregateDeclaration* ad);

    ///
    IrTypeAggr* isAggr()            { return this; }

protected:
    /// AggregateDeclaration this type represents.
    AggregateDeclaration* aggr;
};

//////////////////////////////////////////////////////////////////////////////

class IrTypeStruct : public IrTypeAggr
{
public:
    ///
    IrTypeStruct(StructDeclaration* sd);

    ///
    IrTypeStruct* isStruct()    { return this; }

    ///
    const llvm::Type* buildType();

protected:
    /// StructDeclaration this type represents.
    StructDeclaration* sd;

    /// DMD TypeStruct of this type.
    TypeStruct* ts;
};

//////////////////////////////////////////////////////////////////////////////

#endif