Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLLImportRelocation pass doesn't support GEPs #3926

Closed
kinke opened this issue Mar 1, 2022 · 0 comments
Closed

DLLImportRelocation pass doesn't support GEPs #3926

kinke opened this issue Mar 1, 2022 · 0 comments

Comments

@kinke
Copy link
Member

kinke commented Mar 1, 2022

It's currently limited to initializers referencing either a dllimport global directly, or a cast one. For

void foo() {
    import std.variant;
    auto t = typeid(VariantN!16);
}

the generated TypeInfo_Struct uses a GEP:

@_D42TypeInfo_S3std7variant__T8VariantNVmi16ZQp6__initZ = linkonce_odr global %object.TypeInfo_Struct { …, { i64, i8* } { i64 24, i8* getelementptr inbounds (%"std.variant.VariantN!16LU.VariantN", %"std.variant.VariantN!16LU.VariantN"* @_D3std7variant__T8VariantNVmi16ZQp6__initZ, i32 0, i32 0, i32 0) }, …
…
@_D3std7variant__T8VariantNVmi16ZQp6__initZ = external dllimport constant %"std.variant.VariantN!16LU.VariantN", align 8 ; [#uses = 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant