Mercurial > projects > ldc
diff gen/todebug.cpp @ 1228:79758fd2f48a
Added Doxygen file.
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Wed, 15 Apr 2009 20:06:25 +0200 |
parents | 8038b106c458 |
children | 73b56541152c |
line wrap: on
line diff
--- a/gen/todebug.cpp Mon Apr 13 17:42:36 2009 +0200 +++ b/gen/todebug.cpp Wed Apr 15 20:06:25 2009 +0200 @@ -13,6 +13,7 @@ #include "gen/logger.h" #include "gen/llvmhelpers.h" #include "gen/linkage.h" +#include "gen/utils.h" #include "ir/irmodule.h" @@ -288,14 +289,12 @@ std::vector<LLConstant*> elems; if (!ir->aggrdecl->isInterfaceDeclaration()) // plain interfaces don't have one { - std::vector<VarDeclaration*>& arr = ir->varDecls; - size_t narr = arr.size(); + ArrayIter<VarDeclaration> it(sd->fields); + size_t narr = sd->fields.dim; elems.reserve(narr); - for (int k=0; k<narr; k++) + for (; !it.done(); it.next()) { - VarDeclaration* vd = arr[k]; - assert(vd); - + VarDeclaration* vd = it.get(); LLGlobalVariable* ptr = dwarfMemberType(vd->loc.linnum, vd->type, compileUnit, definedCU, vd->toChars(), vd->offset).getGV(); elems.push_back(DBG_CAST(ptr)); }