comparison gen/dvalue.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 6057fdf797d8
children 45a67b6f1310
comparison
equal deleted inserted replaced
433:b5f55f471e0b 435:74101be2a553
8 #include "declaration.h" 8 #include "declaration.h"
9 9
10 ///////////////////////////////////////////////////////////////////////////////////////////////// 10 /////////////////////////////////////////////////////////////////////////////////////////////////
11 ///////////////////////////////////////////////////////////////////////////////////////////////// 11 /////////////////////////////////////////////////////////////////////////////////////////////////
12 12
13 DVarValue::DVarValue(VarDeclaration* vd, LLValue* llvmValue, bool lvalue) 13 DVarValue::DVarValue(Type* t, VarDeclaration* vd, LLValue* llvmValue, bool lvalue)
14 { 14 {
15 var = vd; 15 var = vd;
16 val = llvmValue; 16 val = llvmValue;
17 rval = 0; 17 rval = 0;
18 lval = lvalue; 18 lval = lvalue;
19 type = var->type; 19 type = t;
20 } 20 }
21 21
22 DVarValue::DVarValue(Type* t, LLValue* lv, LLValue* rv) 22 DVarValue::DVarValue(Type* t, LLValue* lv, LLValue* rv)
23 { 23 {
24 var = 0; 24 var = 0;