Mercurial > projects > ldc
diff dmd/dsymbol.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 | 1714836f2c0b |
children | dbe4af57b240 |
line wrap: on
line diff
--- a/dmd/dsymbol.h Thu Mar 26 18:46:21 2009 +0100 +++ b/dmd/dsymbol.h Thu Mar 26 20:45:53 2009 +0100 @@ -22,7 +22,7 @@ #include "arraytypes.h" // llvm -#include "../ir/irsymbol.h" +#include "../ir/irdsymbol.h" struct Identifier; struct Scope; @@ -49,7 +49,6 @@ struct NewDeclaration; struct VarDeclaration; struct AttribDeclaration; -struct Symbol; struct Package; struct Module; struct Import; @@ -72,6 +71,10 @@ struct TypeInfoDeclaration; struct ClassInfoDeclaration; +#if IN_DMD +struct Symbol; +#endif + #if IN_GCC union tree_node; typedef union tree_node TYPE; @@ -104,8 +107,10 @@ Identifier *ident; Identifier *c_ident; Dsymbol *parent; +#if IN_DMD Symbol *csym; // symbol for code generator Symbol *isym; // import version of csym +#endif unsigned char *comment; // documentation comment for this Dsymbol Loc loc; // where defined @@ -171,16 +176,20 @@ virtual void emitComment(Scope *sc); void emitDitto(Scope *sc); +#if IN_DMD // Backend virtual Symbol *toSymbol(); // to backend symbol +#endif virtual void toObjFile(int multiobj); // compile to .obj file +#if IN_DMD virtual int cvMember(unsigned char *p); // emit cv debug info for member Symbol *toImport(); // to backend import symbol static Symbol *toImport(Symbol *s); // to backend import symbol Symbol *toSymbolX(const char *prefix, int sclass, TYPE *t, const char *suffix); // helper +#endif // Eliminate need for dynamic_cast virtual Package *isPackage() { return NULL; } @@ -222,10 +231,12 @@ virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return NULL; } virtual ClassInfoDeclaration* isClassInfoDeclaration() { return NULL; } +#if IN_LLVM // llvm stuff int llvmInternal; IrDsymbol ir; +#endif }; // Dsymbol that generates a scope