mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-21 07:13:13 +01:00
[svn r348] Switch on class invariants (except in release mode).
Generate correct member for classInvariant in classinfo struct.
This commit is contained in:
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
|
||||
global.params.argv0 = argv[0];
|
||||
global.params.link = 1;
|
||||
global.params.useAssert = 0;
|
||||
global.params.useInvariants = 0;
|
||||
global.params.useInvariants = 1;
|
||||
global.params.useIn = 1;
|
||||
global.params.useOut = 1;
|
||||
global.params.useArrayBounds = 0;
|
||||
|
||||
@@ -1553,8 +1553,14 @@ void DtoDefineClassInfo(ClassDeclaration* cd)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user