comparison gen/irstate.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 7f92f477ff53
children 5c17f81fc1c1
comparison
equal deleted inserted replaced
155:7f92f477ff53 156:ccd07d9f2ce9
9 #include "aggregate.h" 9 #include "aggregate.h"
10 10
11 #include "ir/irfunction.h" 11 #include "ir/irfunction.h"
12 #include "ir/irstruct.h" 12 #include "ir/irstruct.h"
13 #include "ir/irvar.h" 13 #include "ir/irvar.h"
14 #include "ir/irsymbol.h"
14 15
15 // global ir state for current module 16 // global ir state for current module
16 struct IRState; 17 struct IRState;
17 extern IRState* gIR; 18 extern IRState* gIR;
18 extern const llvm::TargetData* gTargetData; 19 extern const llvm::TargetData* gTargetData;
23 struct FuncDeclaration; 24 struct FuncDeclaration;
24 struct Module; 25 struct Module;
25 struct TypeStruct; 26 struct TypeStruct;
26 struct BaseClass; 27 struct BaseClass;
27 struct TryFinallyStatement; 28 struct TryFinallyStatement;
29
30 struct IrModule;
28 31
29 // represents a scope 32 // represents a scope
30 struct IRScope 33 struct IRScope
31 { 34 {
32 llvm::BasicBlock* begin; 35 llvm::BasicBlock* begin;
71 74
72 // module 75 // module
73 Module* dmodule; 76 Module* dmodule;
74 llvm::Module* module; 77 llvm::Module* module;
75 78
79 // ir data associated with DMD Dsymbol nodes
80 std::map<Dsymbol*, IrDsymbol> irDsymbol;
81
76 // functions 82 // functions
77 typedef std::vector<IrFunction*> FunctionVector; 83 typedef std::vector<IrFunction*> FunctionVector;
78 FunctionVector functions; 84 FunctionVector functions;
79 IrFunction* func(); 85 IrFunction* func();
80 // ir data associated with function declarations
81 std::map<FuncDeclaration*, IrFunction*> irFunc;
82 86
83 llvm::Function* topfunc(); 87 llvm::Function* topfunc();
84 TypeFunction* topfunctype(); 88 TypeFunction* topfunctype();
85 llvm::Instruction* topallocapoint(); 89 llvm::Instruction* topallocapoint();
86 90