comparison ir/irsymbol.h @ 156:ccd07d9f2ce9 trunk

[svn r172] moving all IR state previously stored in Dsymbol into IrDsymbol and a Dsymbol->IrDsymbol map
author ChristianK
date Thu, 01 May 2008 13:05:53 +0200
parents
children db9890b3fb64
comparison
equal deleted inserted replaced
155:7f92f477ff53 156:ccd07d9f2ce9
1 #ifndef LLVMDC_IR_IRSYMBOL_H
2 #define LLVMDC_IR_IRSYMBOL_H
3
4 #include "ir/ir.h"
5
6 struct IrModule;
7 struct IrFunction;
8 struct IrStruct;
9 struct IrGlobal;
10 struct IrLocal;
11 struct IrField;
12 struct IrVar;
13
14 struct IrDsymbol
15 {
16 Module* DModule;
17
18 bool resolved;
19 bool declared;
20 bool initialized;
21 bool defined;
22
23 IrModule* irModule;
24
25 IrStruct* irStruct;
26
27 IrFunction* irFunc;
28
29 IrGlobal* irGlobal;
30 IrLocal* irLocal;
31 IrField* irField;
32 IrVar* getIrVar()
33 {
34 assert(irGlobal || irLocal || irField);
35 return irGlobal ? (IrVar*)irGlobal : irLocal ? (IrVar*)irLocal : (IrVar*)irField;
36 }
37 llvm::Value*& getIrValue() { return getIrVar()->value; }
38 };
39
40 #endif