mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Fix v1.31 regression wrt. unresolved IrAggr (#4312)
And use `IrTypeClass::getVtblType()` to get the vtable LLVM array type, instead of deriving it from the `IrClass::getVtblSymbol()` global (invoking that function may define the vtable!). I've hit some compiler crashes for the Symmetry code base, on Windows only. I guess the problem surfaced due to `-link-defaultlib-shared`, which on Windows causes some vtables of instantiated classes to be defined whenever accessing the vtable symbol. I don't have a reduced test case unfortunately.
This commit is contained in:
parent
58c4b8bdae
commit
5f46c65ab5
5 changed files with 37 additions and 39 deletions
|
@ -441,9 +441,8 @@ void buildTypeInfo(TypeInfoDeclaration *decl) {
|
|||
assert(isBuiltin && "existing global expected to be the init symbol of a "
|
||||
"built-in TypeInfo");
|
||||
} else {
|
||||
DtoType(decl->type);
|
||||
TypeClass *tclass = decl->type->isTypeClass();
|
||||
LLType *type = getIrType(tclass)->isClass()->getMemoryLLType();
|
||||
TypeClass *tc = decl->type->isTypeClass();
|
||||
LLType *type = getIrType(tc->sym->type, true)->isClass()->getMemoryLLType();
|
||||
// We need to keep the symbol mutable as the type is not declared as
|
||||
// immutable on the D side, and e.g. synchronized() can be used on the
|
||||
// implicit monitor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue