mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
Improve robustness for TypeInfos of speculative types by only eliding their TypeInfo definition, not the declaration of the LL global altogether. `DtoTypeInfoOf()` expects the LL global to be created and otherwise fails with an assertion or segfault (e.g., issue #2357). So now only linker errors should result in case the TypeInfo definition is missing. Also normalize the calls to `DtoTypeInfoOf()` and revise the following pointer bitcasts, as the LL type of forward-declared TypeInfo globals may be opaque.
This commit is contained in:
parent
fa5f318d3a
commit
d1b30d627c
8 changed files with 38 additions and 44 deletions
|
@ -64,7 +64,7 @@ void RTTIBuilder::push_null(Type *T) { push(getNullValue(DtoType(T))); }
|
|||
|
||||
void RTTIBuilder::push_null_vp() { push(getNullValue(getVoidPtrType())); }
|
||||
|
||||
void RTTIBuilder::push_typeinfo(Type *t) { push(DtoTypeInfoOf(t, true)); }
|
||||
void RTTIBuilder::push_typeinfo(Type *t) { push(DtoTypeInfoOf(t)); }
|
||||
|
||||
void RTTIBuilder::push_classinfo(ClassDeclaration *cd) {
|
||||
push(getIrAggr(cd)->getClassInfoSymbol());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue