Mercurial > projects > ldc
diff gen/classes.cpp @ 327:781af50846b2 trunk
[svn r348] Switch on class invariants (except in release mode).
Generate correct member for classInvariant in classinfo struct.
author | ChristianK |
---|---|
date | Thu, 10 Jul 2008 22:00:27 +0200 |
parents | a9697749e898 |
children | 7086a84ab3d6 |
line wrap: on
line diff
--- a/gen/classes.cpp Thu Jul 10 21:29:15 2008 +0200 +++ b/gen/classes.cpp Thu Jul 10 22:00:27 2008 +0200 @@ -1553,8 +1553,14 @@ inits.push_back(c); // invariant - // TODO - c = defc->getOperand(8); + if (cd->inv) { + DtoForceDeclareDsymbol(cd->inv); + c = cd->inv->ir.irFunc->func; +// c = llvm::ConstantExpr::getBitCast(c, defc->getOperand(8)->getType()); + } + else { + c = defc->getOperand(8); + } inits.push_back(c); // uint flags