Mercurial > projects > ldc
comparison gen/elem.h @ 1:c53b6e3fe49a trunk
[svn r5] Initial commit. Most things are very rough.
author | lindquist |
---|---|
date | Sat, 01 Sep 2007 21:43:27 +0200 |
parents | |
children | d3ee9efe20e2 |
comparison
equal
deleted
inserted
replaced
0:a9e71648e74d | 1:c53b6e3fe49a |
---|---|
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; | |
34 | |
35 VarDeclaration* vardecl; | |
36 FuncDeclaration* funcdecl; | |
37 | |
38 llvm::Value* getValue(); | |
39 //llvm::Value* getMemory(); | |
40 | |
41 bool isNull() {return !(mem || val);} | |
42 }; | |
43 | |
44 #endif // LLVMDC_GEN_ELEM_H |