Mercurial > projects > ldc
comparison ir/irvar.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 | 340acf1535d0 |
children | 212ec2d9d176 |
comparison
equal
deleted
inserted
replaced
1215:08f87d8cd101 | 1228:79758fd2f48a |
---|---|
34 | 34 |
35 ////////////////////////////////////////////////////////////////////////////// | 35 ////////////////////////////////////////////////////////////////////////////// |
36 ////////////////////////////////////////////////////////////////////////////// | 36 ////////////////////////////////////////////////////////////////////////////// |
37 ////////////////////////////////////////////////////////////////////////////// | 37 ////////////////////////////////////////////////////////////////////////////// |
38 | 38 |
39 IrField::IrField(VarDeclaration* v) : IrVar(v) | 39 IrField::IrField(VarDeclaration* v, size_t idx, size_t offset) : IrVar(v) |
40 { | 40 { |
41 index = 0; | 41 index = idx; |
42 unionOffset = 0; | 42 unionOffset = offset; |
43 constInit = NULL; | 43 constInit = NULL; |
44 | |
45 assert(V->ir.irField == NULL && "field for this variable already exists"); | |
46 V->ir.irField = this; | |
44 } | 47 } |
45 | 48 |
46 ////////////////////////////////////////////////////////////////////////////// | 49 ////////////////////////////////////////////////////////////////////////////// |
47 ////////////////////////////////////////////////////////////////////////////// | 50 ////////////////////////////////////////////////////////////////////////////// |
48 ////////////////////////////////////////////////////////////////////////////// | 51 ////////////////////////////////////////////////////////////////////////////// |