Mercurial > projects > ldc
comparison dmd/mtype.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 | 1860414bf3b7 |
children | a6dbd571d417 |
comparison
equal
deleted
inserted
replaced
1146:1860414bf3b7 | 1147:dbe4af57b240 |
---|---|
24 #if IN_LLVM | 24 #if IN_LLVM |
25 // llvm | 25 // llvm |
26 #include "../ir/irtype.h" | 26 #include "../ir/irtype.h" |
27 #include "../ir/irfuncty.h" | 27 #include "../ir/irfuncty.h" |
28 namespace llvm { class Type; } | 28 namespace llvm { class Type; } |
29 struct Ir; | |
29 #endif | 30 #endif |
30 | 31 |
31 struct Scope; | 32 struct Scope; |
32 struct Identifier; | 33 struct Identifier; |
33 struct Expression; | 34 struct Expression; |
205 int equals(Object *o); | 206 int equals(Object *o); |
206 int dyncast() { return DYNCAST_TYPE; } // kludge for template.isType() | 207 int dyncast() { return DYNCAST_TYPE; } // kludge for template.isType() |
207 int covariant(Type *t); | 208 int covariant(Type *t); |
208 char *toChars(); | 209 char *toChars(); |
209 static char needThisPrefix(); | 210 static char needThisPrefix(); |
211 #if IN_LLVM | |
212 static void init(Ir*); | |
213 #else | |
210 static void init(); | 214 static void init(); |
215 #endif | |
211 d_uns64 size(); | 216 d_uns64 size(); |
212 virtual d_uns64 size(Loc loc); | 217 virtual d_uns64 size(Loc loc); |
213 virtual unsigned alignsize(); | 218 virtual unsigned alignsize(); |
214 virtual Type *semantic(Loc loc, Scope *sc); | 219 virtual Type *semantic(Loc loc, Scope *sc); |
215 virtual void toDecoBuffer(OutBuffer *buf); | 220 virtual void toDecoBuffer(OutBuffer *buf); |
273 virtual TypeBasic *isTypeBasic(); | 278 virtual TypeBasic *isTypeBasic(); |
274 | 279 |
275 #if IN_LLVM | 280 #if IN_LLVM |
276 // LDC | 281 // LDC |
277 IrType ir; | 282 IrType ir; |
283 static Ir* sir; | |
278 #endif | 284 #endif |
279 }; | 285 }; |
280 | 286 |
281 struct TypeBasic : Type | 287 struct TypeBasic : Type |
282 { | 288 { |