comparison gen/classes.cpp @ 1350:15e9762bb620

Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Thu, 14 May 2009 13:26:40 +0200
parents 0c03ba6f7c24
children 8026319762be
comparison
equal deleted inserted replaced
1349:a376776e2301 1350:15e9762bb620
127 127
128 // allocate 128 // allocate
129 LLValue* mem; 129 LLValue* mem;
130 if (newexp->onstack) 130 if (newexp->onstack)
131 { 131 {
132 mem = DtoAlloca(DtoType(tc)->getContainedType(0), ".newclass_alloca"); 132 // FIXME align scope class to its largest member
133 mem = DtoRawAlloca(DtoType(tc)->getContainedType(0), 0, ".newclass_alloca");
133 } 134 }
134 // custom allocator 135 // custom allocator
135 else if (newexp->allocator) 136 else if (newexp->allocator)
136 { 137 {
137 newexp->allocator->codegen(Type::sir); 138 newexp->allocator->codegen(Type::sir);