Mercurial > projects > ldc
diff dmd/attrib.h @ 1147:dbe4af57b240
Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 27 Mar 2009 17:54:27 +0100 |
parents | 340acf1535d0 |
children | e961851fb8be |
line wrap: on
line diff
--- a/dmd/attrib.h Thu Mar 26 20:45:53 2009 +0100 +++ b/dmd/attrib.h Fri Mar 27 17:54:27 2009 +0100 @@ -50,8 +50,14 @@ void toCBuffer(OutBuffer *buf, HdrGenState *hgs); AttribDeclaration *isAttribDeclaration() { return this; } +#if IN_DMD virtual void toObjFile(int multiobj); // compile to .obj file int cvMember(unsigned char *p); +#endif + +#if IN_LLVM + virtual void codegen(Ir*); +#endif }; struct StorageClassDeclaration: AttribDeclaration @@ -108,8 +114,9 @@ void toCBuffer(OutBuffer *buf, HdrGenState *hgs); const char *kind(); - // LDC - void toObjFile(int multiobj); // compile to .obj file +#if IN_LLVM + void codegen(Ir*); +#endif }; struct PragmaDeclaration : AttribDeclaration @@ -122,7 +129,14 @@ int oneMember(Dsymbol **ps); void toCBuffer(OutBuffer *buf, HdrGenState *hgs); const char *kind(); + +#if IN_DMD void toObjFile(int multiobj); // compile to .obj file +#endif + +#if IN_LLVM + void codegen(Ir*); +#endif }; struct ConditionalDeclaration : AttribDeclaration