view ir/irdsymbol.h @ 1612:081c48283153

Merge DMD r278: bugzilla 370 Compiler stack overflow on recursive... bugzilla 370 Compiler stack overflow on recursive typeof in function declaration. --- dmd/expression.c | 1 + dmd/mtype.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:21 -0300
parents 1860414bf3b7
children
line wrap: on
line source

#ifndef LDC_IR_IRDSYMBOL_H
#define LDC_IR_IRDSYMBOL_H

#include <set>

struct IrModule;
struct IrFunction;
struct IrStruct;
struct IrGlobal;
struct IrLocal;
struct IrField;
struct IrVar;
struct Dsymbol;

namespace llvm {
    struct Value;
}

struct IrDsymbol
{
    static std::set<IrDsymbol*> list;
    static void resetAll();

    // overload all of these to make sure
    // the static list is up to date
    IrDsymbol();
    IrDsymbol(const IrDsymbol& s);
    ~IrDsymbol();

    void reset();

    Module* DModule;

    bool resolved;
    bool declared;
    bool initialized;
    bool defined;

    IrModule* irModule;

    IrStruct* irStruct;

    IrFunction* irFunc;

    IrGlobal* irGlobal;
    IrLocal* irLocal;
    IrField* irField;
    IrVar* getIrVar();
    llvm::Value*& getIrValue();

    bool isSet();
};

#endif