Stream: t-compiler

Topic: Unsized types and LLVM `opaque`


NeoRaider (Apr 20 2020 at 17:46, on Zulip):

Does anyone have some insight in the handling of unsized types in LLVM, and why we want opaque for extern types ( https://github.com/rust-lang/rust/issues/59095 ), but not for other unsized types like slices (or at least I haven't seen any discussion on the latter)? See my last comment on that Github issue

NeoRaider (Apr 20 2020 at 21:07, on Zulip):

I just realized that there is a wg-llvm stream. It seems moving messages to a different stream is not possible though (for a normal user?)

NeoRaider (Apr 23 2020 at 16:31, on Zulip):

This seems to be one of the few remaining open questions for the stabilization of external types

NeoRaider (Apr 23 2020 at 16:31, on Zulip):

cc @WG-llvm

Hanna Kruppe (Apr 23 2020 at 16:34, on Zulip):

It seems @RalfJ's concern is specifically about statics. I don't think you can have a static of an DST, but apparently with extern types it's possible.

NeoRaider (Apr 23 2020 at 17:17, on Zulip):

Hmm, I wonder. I just played around a bit, and it seems to me like clang emits externals of unknown size as "size 0" as well:

extern const char foo[];

turns into

@foo = external global [0 x i8], align 1
RalfJ (Apr 24 2020 at 13:10, on Zulip):

hm... that's not what "opaque types" model though, is it? that would be

struct Foo;
extern Foo foo;
RalfJ (Apr 24 2020 at 13:10, on Zulip):

but my concerns here are mainly fed by just not knowing what exactly will and will not assume about statics, because unfortunately LLVM only scarcely documents such things.

RalfJ (Apr 24 2020 at 13:11, on Zulip):

oh you also wrote a bunch of things in the issue; I'll read those and respond there then :)

Last update: Jun 04 2020 at 18:20UTC