[Issue 20925] pragma(inline) should emit code to the calling CU + appropriate linker flags

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 13 03:07:13 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20925

--- Comment #6 from kinke <kinke at gmx.net> ---
(In reply to kinke from comment #5)
> Making `pragma(inline, true)` mean linkonce_odr emission into each referencing 
> CU (and absolutely having to do nothing with actual inlining into callers)

That's wrong on my part; emitting the function into each referencing CU does
enable 'normal' inlining (excl. DMD with its AST-based inlining) in non-owning
CUs. It's basically a way to selectively enable potential cross-module/CU
inlining for a function, without extra inlining hints.

--


More information about the Digitalmars-d-bugs mailing list