Mercurial > projects > ldc
comparison gen/tollvm.c @ 24:25bb577878e8 trunk
[svn r28] * Fixed accessing aggregate fields. it was still not quite right. hopefully is now :)
author | lindquist |
---|---|
date | Thu, 04 Oct 2007 10:13:21 +0200 |
parents | 8d45266bbabe |
children | 92408a3a2bac |
comparison
equal
deleted
inserted
replaced
23:77e3d1ddae3f | 24:25bb577878e8 |
---|---|
469 VarDeclaration* vd = (VarDeclaration*)si->vars.data[i]; | 469 VarDeclaration* vd = (VarDeclaration*)si->vars.data[i]; |
470 assert(vd); | 470 assert(vd); |
471 Logger::println("vars[%d] = %s", i, vd->toChars()); | 471 Logger::println("vars[%d] = %s", i, vd->toChars()); |
472 | 472 |
473 std::vector<unsigned> idxs; | 473 std::vector<unsigned> idxs; |
474 si->ad->offsetToIndex(vd->offset, idxs); | 474 si->ad->offsetToIndex(vd->type, vd->offset, idxs); |
475 assert(idxs.size() == 1); | 475 assert(idxs.size() == 1); |
476 unsigned idx = idxs[0]; | 476 unsigned idx = idxs[0]; |
477 | 477 |
478 llvm::Constant* v = 0; | 478 llvm::Constant* v = 0; |
479 | 479 |