Mercurial > projects > ldc
annotate gen/elem.h @ 11:d3ee9efe20e2 trunk
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
* Now 50/51 tests compile.
* Added a simple runalltests.d scripts that should be run with 'gdmd -run runalltests.d' - LLVMDC will not compile it yet.
author | lindquist |
---|---|
date | Tue, 02 Oct 2007 05:10:18 +0200 |
parents | c53b6e3fe49a |
children | 37a4fdab33fc |
rev | line source |
---|---|
1 | 1 #ifndef LLVMDC_GEN_ELEM_H |
2 #define LLVMDC_GEN_ELEM_H | |
3 | |
4 #include "llvm/Value.h" | |
5 | |
6 #include "root.h" | |
7 #include "declaration.h" | |
8 #include "aggregate.h" | |
9 | |
10 // represents a value. be it a constant literal, a variable etc. | |
11 // maintains all the information for doing load/store appropriately | |
12 struct elem : Object | |
13 { | |
14 enum { | |
15 NONE, | |
16 VAR, | |
17 VAL, | |
18 FUNC, | |
19 CONST, | |
20 NUL, | |
21 REF, | |
22 SLICE | |
23 }; | |
24 | |
25 public: | |
26 elem(); | |
27 | |
28 llvm::Value* mem; | |
29 llvm::Value* val; | |
30 llvm::Value* arg; | |
31 int type; | |
32 bool inplace; | |
33 bool field; | |
11
d3ee9efe20e2
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents:
1
diff
changeset
|
34 unsigned callconv; |
1 | 35 |
36 VarDeclaration* vardecl; | |
37 FuncDeclaration* funcdecl; | |
38 | |
39 llvm::Value* getValue(); | |
40 //llvm::Value* getMemory(); | |
41 | |
42 bool isNull() {return !(mem || val);} | |
43 }; | |
44 | |
45 #endif // LLVMDC_GEN_ELEM_H |