Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 435:74101be2a553
Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration.
Added support for align(1)/packed structs, other alignments are still ignored.
Fixed some problems with accessing lazy arguments.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 30 Jul 2008 10:12:55 +0200 |
parents | b5f55f471e0b |
children | 47b64d06eb9f |
comparison
equal
deleted
inserted
replaced
433:b5f55f471e0b | 435:74101be2a553 |
---|---|
1262 | 1262 |
1263 Logger::cout() << "llvm value for decl: " << *vd->ir.irLocal->value << '\n'; | 1263 Logger::cout() << "llvm value for decl: " << *vd->ir.irLocal->value << '\n'; |
1264 DValue* ie = DtoInitializer(vd->init); | 1264 DValue* ie = DtoInitializer(vd->init); |
1265 } | 1265 } |
1266 | 1266 |
1267 return new DVarValue(vd, vd->ir.getIrValue(), true); | 1267 return new DVarValue(vd->type, vd, vd->ir.getIrValue(), true); |
1268 } | 1268 } |
1269 // struct declaration | 1269 // struct declaration |
1270 else if (StructDeclaration* s = declaration->isStructDeclaration()) | 1270 else if (StructDeclaration* s = declaration->isStructDeclaration()) |
1271 { | 1271 { |
1272 Logger::println("StructDeclaration"); | 1272 Logger::println("StructDeclaration"); |