[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

John McCall rjmccall at apple.com
Tue Oct 16 16:19:33 PDT 2012


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
>>> Log:
>>> 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.

John.



More information about the cfe-commits mailing list