What does 'inline' mean?

Stanislav Blinov stanislav.blinov at gmail.com
Tue Jun 9 11:30:38 UTC 2020


On Tuesday, 9 June 2020 at 10:26:45 UTC, Walter Bright wrote:
> On 6/8/2020 7:54 AM, Stanislav Blinov wrote:
>> On Monday, 8 June 2020 at 14:45:46 UTC, H. S. Teoh wrote:
>> 
>>> Could you just use LTO for this?  LDC's LTO, for example, 
>>> lets the linker discard unreferenced symbols.
>> 
>> LTO is a tool that attempts to solve a problem that does not 
>> need to exist. This could be said about linkers in general.
>
> In the separate compilation model, compilers know nothing about 
> what other compilation units may or may not call. This is why 
> elision of unreferenced symbols belongs in the linker.

That is no reason for another [instance of the same] compiler not 
to have access to symbol table, and some form of source 
representation, at compile time, obviating the need for (much of) 
linker's work. LTO does what compilers ought to be doing.


More information about the Digitalmars-d mailing list