Mercurial > projects > ldc
comparison dmd/attrib.c @ 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 | 1860414bf3b7 |
children | 521dd1626d76 |
comparison
equal
deleted
inserted
replaced
1146:1860414bf3b7 | 1147:dbe4af57b240 |
---|---|
169 s->emitComment(sc); | 169 s->emitComment(sc); |
170 } | 170 } |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 #if IN_DMD | |
175 | |
174 void AttribDeclaration::toObjFile(int multiobj) | 176 void AttribDeclaration::toObjFile(int multiobj) |
175 { | 177 { |
176 Array *d = include(NULL, NULL); | 178 Array *d = include(NULL, NULL); |
177 | 179 |
178 if (d) | 180 if (d) |
182 s->toObjFile(multiobj); | 184 s->toObjFile(multiobj); |
183 } | 185 } |
184 } | 186 } |
185 } | 187 } |
186 | 188 |
187 #if IN_DMD | |
188 int AttribDeclaration::cvMember(unsigned char *p) | 189 int AttribDeclaration::cvMember(unsigned char *p) |
189 { | 190 { |
190 int nwritten = 0; | 191 int nwritten = 0; |
191 int n; | 192 int n; |
192 Array *d = include(NULL, NULL); | 193 Array *d = include(NULL, NULL); |
1140 const char *PragmaDeclaration::kind() | 1141 const char *PragmaDeclaration::kind() |
1141 { | 1142 { |
1142 return "pragma"; | 1143 return "pragma"; |
1143 } | 1144 } |
1144 | 1145 |
1146 #if IN_DMD | |
1145 void PragmaDeclaration::toObjFile(int multiobj) | 1147 void PragmaDeclaration::toObjFile(int multiobj) |
1146 { | 1148 { |
1147 if (ident == Id::lib) | 1149 if (ident == Id::lib) |
1148 { | 1150 { |
1149 assert(args && args->dim == 1); | 1151 assert(args && args->dim == 1); |
1158 name[se->len] = 0; | 1160 name[se->len] = 0; |
1159 obj_includelib(name); | 1161 obj_includelib(name); |
1160 } | 1162 } |
1161 AttribDeclaration::toObjFile(multiobj); | 1163 AttribDeclaration::toObjFile(multiobj); |
1162 } | 1164 } |
1165 #endif | |
1163 | 1166 |
1164 void PragmaDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs) | 1167 void PragmaDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs) |
1165 { | 1168 { |
1166 buf->printf("pragma(%s", ident->toChars()); | 1169 buf->printf("pragma(%s", ident->toChars()); |
1167 if (args) | 1170 if (args) |