On 1/8/24 04:21, Iain Sandoe wrote:
On 6 Jan 2024, at 22:30, Nathan Sidwell <nat...@acm.org> wrote:

Richard Smith & I discussed whether we should use the module interface's 
capability of giving vague linkage entities a strong location. I didn't want to go 
messing with that, 'cos it was changing yet more stuff.

But, perhaps we should revisit that?  Any keyless polymorphic class in module 
purview gets its vtables etc emitted in the module's object file?  Likewise 
these kinds of entities.

cc'ing Iain, who probably knows more about Clang's state here.

I have been trying to keep up with this thread, but not sure if I can throw a 
whole lot of light on things.

There is an on-going attempt (now some 3 or 4 papers in) to try and figure out 
how to handle `static inline` entities at least at file scope - but that 
appears to be a different case (I can try an locate the latest paper on this if 
needed; the topic was discussed in Varna and Kona, but no new paper yet - 
perhaps Michael [Spencer] will bring a paper in Tokyo).

clang ran into some issues with vtables and that resulted in some discussion 
about whether there should be an amendment to the Itanium ABI to deal with the 
module-specific stuff.

https://github.com/itanium-cxx-abi/cxx-abi/issues/170

https://github.com/llvm/llvm-project/pull/75912#discussion_r1444150069

Sorry I cannot be much more specific at present,

That's pretty specific that vtables at least get emitted in the module whether or not there's a key function. I've asked on that issue why this only applies to vtables.

Jason

Reply via email to