diff 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
line wrap: on
line diff
--- a/gen/classes.cpp	Wed May 13 18:08:40 2009 +0200
+++ b/gen/classes.cpp	Thu May 14 13:26:40 2009 +0200
@@ -129,7 +129,8 @@
     LLValue* mem;
     if (newexp->onstack)
     {
-        mem = DtoAlloca(DtoType(tc)->getContainedType(0), ".newclass_alloca");
+        // FIXME align scope class to its largest member
+        mem = DtoRawAlloca(DtoType(tc)->getContainedType(0), 0, ".newclass_alloca");
     }
     // custom allocator
     else if (newexp->allocator)