dmd -H switch and implementation details

Unknown W. Brackets unknown at simplemachines.org
Sun Apr 6 15:17:34 PDT 2008


Yes, that makes an awful lot of sense...

-[Unknown]


Sean Kelly wrote:
> Perhaps the header generation should only add function bodies if -inline is set when the
> header is generated.  Seems like it would be an easy way to let the programmer control
> the behavior.
> 
> == Quote from Unknown W. Brackets (unknown at simplemachines.org)'s article
>> The idea is that short functions which are candidates for inlining are
>> still included in the di file.  I don't believe there's any switch to
>> skip these (which might be needed if you expect your implementation to
>> change and don't want to recompile the client proram.)
>> Still, for efficiency, you do want inlining where it makes sense (helper
>> functions, etc.) and it needs those implementations for it.
>> -[Unknown]
>> dominik wrote:
>>> I thought -H switch would give a .di file occluding the implementation
>>> details of functions.
>>> I'm building a dll and I have tried to make a .di file with externs and
>>> exports in it without implementation (which is obviously in a DLL), however
>>> I saw implementation being included in .di file.
>>>
>>> Is there another switch which makes only a declaration .di without
>>> definition? Or maybe a separate utility for that?
>>>
>>>
> 
> 



More information about the Digitalmars-d mailing list