Mercurial > projects > ldc
diff ir/irdsymbol.h @ 1146:1860414bf3b7
* Moved ir/irsymbol.cpp/h into ir/irdsymbol.cpp/h.
* Added #if IN_DMD versioning around DMD backend specific code in the D1 frontend, D2 is currently broken.
* All part of a greater cleanup scheme.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 26 Mar 2009 20:45:53 +0100 |
parents | ir/irsymbol.h@eef8ac26c66c |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ir/irdsymbol.h Thu Mar 26 20:45:53 2009 +0100 @@ -0,0 +1,54 @@ +#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