[llvm-commits] [dragonegg] r150341 - in /dragonegg/trunk: include/dragonegg/ABI.h src/DefaultABI.cpp

David Blaikie dblaikie at gmail.com
Mon Feb 13 08:30:09 PST 2012


On Mon, Feb 13, 2012 at 1:05 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Bill,
>
>>> --- dragonegg/trunk/include/dragonegg/ABI.h (original)
>>> +++ dragonegg/trunk/include/dragonegg/ABI.h Sun Feb 12 09:35:35 2012
>>> @@ -42,6 +42,7 @@
>>> /// DefaultABIClient - This is a simple implementation of the ABI client
>>> /// interface that can be subclassed.
>>> struct DefaultABIClient {
>>> +  virtual void anchor();
>>>    virtual ~DefaultABIClient() {}
>>
>> Why not just use the d'tor as the anchor instead of a whole other (unused) method?
>
> as a devotee of the cargo-cult, I was happy to copy what LLVM does - if it's
> good for LLVM, it must be good for all the world right! :)

To be fair - "what LLVM does" is just "what I did" a few months ago &
it came under some debate - but since no one came up with something
better, I guess it is "what LLVM does" now ;)

Ahmed brought up a good point - that I could've at least put all these
singular anchor definitions in per-library "anchors.cpp" rather than
adding separate TUs for each class I had to anchor that was entirely
header-only. I'll probably go back & do that when I try to/finish
making LLVM -Wweak-vtable clean (there's some major areas in
llvm-tblgen code that I haven't addressed, etc).

- David

>
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list