[Issue 23435] Add Flag To Disable All Inlining

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 31 05:03:09 UTC 2022


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

--- Comment #2 from Jack Stouffer <jack at jackstouffer.com> ---
(In reply to RazvanN from comment #1)
> Given the history of dismissing the addition of CLI options, I think that
> this bug report has a small chance of being fixed. However, as a workaround
> you could define an `enum INLINE=true` and use `pragma(inline, INLINE)`
> instead of `pragma(inline, true)`. That way, you can just switch the INLINE
> to false when you don't want the compiler to do any inlining.

This doesn't work for inlined functions in dub packages, as you have no control
over the source in that case. An actual work-around here is using ldc and
passing in --enable-inlining=false, which really sucks because the ldc build
for my project is way slower.

Since there's already a precedent from LDC, this seems like a really sensible
addition. It seems like a smaller change that would make using debuggers a much
better experience for everyone. Although, I'm starting to wonder how many D
developers use debuggers at all.

--


More information about the Digitalmars-d-bugs mailing list