comparison 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
comparison
equal deleted inserted replaced
1146:1860414bf3b7 1147:dbe4af57b240
48 void checkCtorConstInit(); 48 void checkCtorConstInit();
49 void addLocalClass(ClassDeclarations *); 49 void addLocalClass(ClassDeclarations *);
50 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 50 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
51 AttribDeclaration *isAttribDeclaration() { return this; } 51 AttribDeclaration *isAttribDeclaration() { return this; }
52 52
53 #if IN_DMD
53 virtual void toObjFile(int multiobj); // compile to .obj file 54 virtual void toObjFile(int multiobj); // compile to .obj file
54 int cvMember(unsigned char *p); 55 int cvMember(unsigned char *p);
56 #endif
57
58 #if IN_LLVM
59 virtual void codegen(Ir*);
60 #endif
55 }; 61 };
56 62
57 struct StorageClassDeclaration: AttribDeclaration 63 struct StorageClassDeclaration: AttribDeclaration
58 { 64 {
59 unsigned stc; 65 unsigned stc;
106 Dsymbol *syntaxCopy(Dsymbol *s); 112 Dsymbol *syntaxCopy(Dsymbol *s);
107 void semantic(Scope *sc); 113 void semantic(Scope *sc);
108 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 114 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
109 const char *kind(); 115 const char *kind();
110 116
111 // LDC 117 #if IN_LLVM
112 void toObjFile(int multiobj); // compile to .obj file 118 void codegen(Ir*);
119 #endif
113 }; 120 };
114 121
115 struct PragmaDeclaration : AttribDeclaration 122 struct PragmaDeclaration : AttribDeclaration
116 { 123 {
117 Expressions *args; // array of Expression's 124 Expressions *args; // array of Expression's
120 Dsymbol *syntaxCopy(Dsymbol *s); 127 Dsymbol *syntaxCopy(Dsymbol *s);
121 void semantic(Scope *sc); 128 void semantic(Scope *sc);
122 int oneMember(Dsymbol **ps); 129 int oneMember(Dsymbol **ps);
123 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 130 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
124 const char *kind(); 131 const char *kind();
132
133 #if IN_DMD
125 void toObjFile(int multiobj); // compile to .obj file 134 void toObjFile(int multiobj); // compile to .obj file
135 #endif
136
137 #if IN_LLVM
138 void codegen(Ir*);
139 #endif
126 }; 140 };
127 141
128 struct ConditionalDeclaration : AttribDeclaration 142 struct ConditionalDeclaration : AttribDeclaration
129 { 143 {
130 Condition *condition; 144 Condition *condition;