Mercurial > projects > ldc
comparison gen/toir.cpp @ 1147:dbe4af57b240
Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 27 Mar 2009 17:54:27 +0100 |
parents | 1860414bf3b7 |
children | 3d1b16dabd25 |
comparison
equal
deleted
inserted
replaced
1146:1860414bf3b7 | 1147:dbe4af57b240 |
---|---|
145 else { | 145 else { |
146 Logger::println("a normal variable"); | 146 Logger::println("a normal variable"); |
147 | 147 |
148 // take care of forward references of global variables | 148 // take care of forward references of global variables |
149 if (vd->isDataseg() || (vd->storage_class & STCextern)) { | 149 if (vd->isDataseg() || (vd->storage_class & STCextern)) { |
150 vd->toObjFile(0); // TODO: multiobj | 150 vd->codegen(Type::sir); |
151 } | 151 } |
152 | 152 |
153 LLValue* val; | 153 LLValue* val; |
154 | 154 |
155 if (!vd->ir.isSet() || !(val = vd->ir.getIrValue())) { | 155 if (!vd->ir.isSet() || !(val = vd->ir.getIrValue())) { |