This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA/RFC: Add support for exporting vtables based on dllexport/dllimportattributes

Hi Ian,

 The code was actually developed by Red Hat for Symbian who have been
 using it successfully for a little while now.  I realise that the
 patch is adding a #ifdef controlled conditional piece of code to the
 generic decl2.c file, but I could not think of a clean way for a
 particular back end (or set of backends) to otherwise intercept the
 class exporting code and add the necessary attributes.

It seems that you could at least make it a target hook rather than
using #ifdef.  But I say this without really understanding what the
patch does.

I did think about that, but I was hesitant because I was not sure if language-specific target hooks are allowed. Although now that I look at the code I notice that there is a have_ctors_dtors target hook which looks like it might be C++ specific. (Or at least not applicable to all languages).

I'll see what Mark and/or Jason say and it they think that it is a good idea I will expand the patch to include it.


PS. I forgot to include with the patch a small change to gcc/doc/tm.texi that documents the existence of the DLLEXPORTED_VTABLES #define. I will include this is any revised patch.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]