changeset 292:a92ec67eabe7 trunk

[svn r313] Fix class initializer size regression introduced in [305]. Fixes memory_management_05 and odd_bug_15_A.
author ChristianK
date Sun, 22 Jun 2008 13:23:28 +0200
parents 068cb3c60afb
children ebfa488f4abc
files gen/classes.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gen/classes.cpp	Sat Jun 21 21:16:26 2008 +0200
+++ b/gen/classes.cpp	Sun Jun 22 13:23:28 2008 +0200
@@ -1482,8 +1482,8 @@
     }
     else {
         c = llvm::ConstantExpr::getBitCast(cd->ir.irStruct->init, byteptrty);
-        assert(!defc->getType()->isAbstract());
-        size_t initsz = getABITypeSize(defc->getType());
+        assert(!cd->ir.irStruct->constInit->getType()->isAbstract());
+        size_t initsz = getABITypeSize(cd->ir.irStruct->constInit->getType());
         c = DtoConstSlice(DtoConstSize_t(initsz), c);
     }
     inits.push_back(c);