annotate gen/irstate.cpp @ 100:5071469303d4 trunk

[svn r104] TONS OF FIXES. Split up declaration, constant initializer gen and definition for globals, structs, classes and functions. Improved ClassInfo support (not complete), not in vtable yet. Fixed a bunch of forward reference problems. Much more. Major commit! :)
author lindquist
date Fri, 16 Nov 2007 08:21:47 +0100
parents 61615fa85940
children 855adfdb8d38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
1 /* DMDFE backend stubs
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
2 * This file contains the implementations of the backend routines.
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
3 * For dmdfe these do nothing but print a message saying the module
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
4 * has been parsed. Substitute your own behaviors for these routimes.
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
5 */
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
6
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
7 #include <cstdarg>
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
8
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
9 #include "gen/llvm.h"
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
10
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
11 #include "mtype.h"
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
12 #include "declaration.h"
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
13
4
e116aa1488e6 [svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents: 1
diff changeset
14 #include "gen/irstate.h"
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
15 #include "tollvm.h"
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
16
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
17 IRState* gIR = 0;
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
18 const llvm::TargetData* gTargetData = 0;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
19
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
20 //////////////////////////////////////////////////////////////////////////////////////////
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
21 IRScope::IRScope()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
22 {
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
23 begin = end = NULL;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
24 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
25
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
26 IRScope::IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e)
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
27 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
28 begin = b;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
29 end = e;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
30 builder.SetInsertPoint(b);
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
31 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
32
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
33 //////////////////////////////////////////////////////////////////////////////////////////
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
34 IRState::IRState()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
35 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
36 dmodule = 0;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
37 module = 0;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
38 emitMain = false;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
39 mainFunc = 0;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
40 ir.state = this;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
41 }
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
42
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
43 IRFunction* IRState::func()
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
44 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
45 assert(!functions.empty() && "Function stack is empty!");
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
46 return functions.back();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
47 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
48
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
49 llvm::Function* IRState::topfunc()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
50 {
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
51 assert(!functions.empty() && "Function stack is empty!");
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
52 return functions.back()->func;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
53 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
54
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
55 TypeFunction* IRState::topfunctype()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
56 {
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
57 assert(!functions.empty() && "Function stack is empty!");
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
58 return functions.back()->type;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
59 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
60
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
61 llvm::Instruction* IRState::topallocapoint()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
62 {
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
63 assert(!functions.empty() && "AllocaPoint stack is empty!");
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
64 return functions.back()->allocapoint;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
65 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
66
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
67 IRStruct* IRState::topstruct()
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
68 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
69 assert(!structs.empty() && "Struct vector is empty!");
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
70 return structs.back();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
71 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
72
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
73 IRExp* IRState::topexp()
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
74 {
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
75 return exps.empty() ? NULL : &exps.back();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
76 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
77
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
78 IRScope& IRState::scope()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
79 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
80 assert(!scopes.empty());
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
81 return scopes.back();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
82 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
83
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
84 llvm::BasicBlock* IRState::scopebb()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
85 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
86 return scopebegin();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
87 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
88 llvm::BasicBlock* IRState::scopebegin()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
89 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
90 IRScope& s = scope();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
91 assert(s.begin);
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
92 return s.begin;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
93 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
94 llvm::BasicBlock* IRState::scopeend()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
95 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
96 IRScope& s = scope();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
97 assert(s.end);
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
98 return s.end;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
99 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
100 bool IRState::scopereturned()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
101 {
14
0e86428ee567 [svn r18] * Initial support for switch statements - No string switches yet.
lindquist
parents: 6
diff changeset
102 //return scope().returned;
0e86428ee567 [svn r18] * Initial support for switch statements - No string switches yet.
lindquist
parents: 6
diff changeset
103 return !scopebb()->empty() && scopebb()->back().isTerminator();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
104 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
105
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
106 //////////////////////////////////////////////////////////////////////////////////////////
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
107
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
108 IRStruct::IRStruct()
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
109 : recty(llvm::OpaqueType::get())
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
110 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
111 type = 0;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
112 defined = false;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
113 constinited = false;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
114 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
115
6
35d93ce68cf4 [svn r10] Updated for LLVM rev. 20070913
lindquist
parents: 4
diff changeset
116 IRStruct::IRStruct(Type* t)
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
117 : recty(llvm::OpaqueType::get())
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
118 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
119 type = t;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
120 defined = false;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
121 constinited = false;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
122 }
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
123
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
124 //////////////////////////////////////////////////////////////////////////////////////////
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
125
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
126 IRFinally::IRFinally()
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
127 {
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
128 bb = 0;
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
129 retbb = 0;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
130 }
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
131
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
132 IRFinally::IRFinally(llvm::BasicBlock* b, llvm::BasicBlock* rb)
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
133 {
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
134 bb = b;
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
135 retbb = rb;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
136 }
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
137
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
138 //////////////////////////////////////////////////////////////////////////////////////////
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
139
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
140 LLVMBuilder* IRBuilderHelper::operator->()
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
141 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
142 LLVMBuilder& b = state->scope().builder;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
143 assert(b.GetInsertBlock() != NULL);
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
144 return &b;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
145 }
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
146
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
147 //////////////////////////////////////////////////////////////////////////////////////////
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
148
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
149 IRFunction::IRFunction(FuncDeclaration* fd)
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
150 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
151 decl = fd;
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
152 Type* t = DtoDType(fd->type);
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
153 assert(t->ty == Tfunction);
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
154 type = (TypeFunction*)t;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
155 func = NULL;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
156 allocapoint = NULL;
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
157 finallyretval = NULL;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
158 defined = false;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
159 }
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
160
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
161 //////////////////////////////////////////////////////////////////////////////////////////
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
162
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
163 IRExp::IRExp()
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
164 {
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
165 e1 = e2 = NULL;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
166 v = NULL;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
167 }
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
168
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
169 IRExp::IRExp(Expression* l, Expression* r, DValue* val)
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
170 {
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
171 e1 = l;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
172 e2 = r;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
173 v = val;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
174 }
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
175
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
176 //////////////////////////////////////////////////////////////////////////////////////////
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
177
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
178 IRGlobal::IRGlobal(VarDeclaration* v) :
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
179 type(llvm::OpaqueType::get())
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
180 {
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
181 var = v;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 94
diff changeset
182 }