[cfe-commits] r166069 - in /cfe/trunk: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGVTables.cpp lib/CodeGen/ItaniumCXXABI.cpp lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/vtt-layout.cpp
dblaikie at gmail.com
Tue Oct 16 16:24:34 PDT 2012
On Tue, Oct 16, 2012 at 4:19 PM, John McCall <rjmccall at apple.com> wrote:
> On Oct 16, 2012, at 4:12 PM, David Blaikie wrote:
>> On Tue, Oct 16, 2012 at 4:09 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>> On Tue, Oct 16, 2012 at 3:56 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>>> Author: dblaikie
>>>> Date: Tue Oct 16 17:56:05 2012
>>>> New Revision: 166069
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=166069&view=rev
>>>> PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.
>>>> This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't
>>>> present in 4.4 - not sure when it got added, but you'll need something with
>>>> that function available for this to work).
>>> The use of __cxa_deleted_function needs to be guarded by some sort of
>>> check; it isn't present on any released version of OS X, so generating
>>> it there will lead to a guaranteed link error.
>> [+John McCall]
>> How else would we like to implement vtables for deleted virtual members?
> linkonce_odr hidden function with an evocative name that calls @llvm.trap?
> The point of this function is just that, if some later version of the class "un-deletes"
> the function, we should reliably blow up if this version gets called.
Sure enough - is there any way we should be doing detection of
__cxa_deleted_function? or should we just implement this in terms of
this, as you say evocatively named, function always?
(any examples of similar hidden functions I should be looking at for
reference when implementing this?)
More information about the cfe-commits