Mercurial > projects > ldc
comparison gen/declarations.cpp @ 1148:3d1b16dabd25
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 27 Mar 2009 21:50:32 +0100 |
parents | dbe4af57b240 |
children | 5ebe8224988b |
comparison
equal
deleted
inserted
replaced
1147:dbe4af57b240 | 1148:3d1b16dabd25 |
---|---|
133 // if this global is used from a nested function, this is necessary or | 133 // if this global is used from a nested function, this is necessary or |
134 // optimization could potentially remove the global (if it's the only use) | 134 // optimization could potentially remove the global (if it's the only use) |
135 if (nakedUse) | 135 if (nakedUse) |
136 gIR->usedArray.push_back(DtoBitCast(gvar, getVoidPtrType())); | 136 gIR->usedArray.push_back(DtoBitCast(gvar, getVoidPtrType())); |
137 | 137 |
138 gIR->constInitList.push_back(this); | 138 DtoConstInitGlobal(this); |
139 } | 139 } |
140 else | 140 else |
141 { | 141 { |
142 // might already have its irField, as classes derive each other without getting copies of the VarDeclaration | 142 // might already have its irField, as classes derive each other without getting copies of the VarDeclaration |
143 if (!ir.irField) | 143 if (!ir.irField) |