r244266 - [ItaniumCXXABI] Don't import RTTI data for classes with key functions

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 18 15:52:44 PDT 2015


On Tue, Aug 18, 2015 at 3:00 PM, Richard Smith via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> On Fri, Aug 14, 2015 at 11:27 AM, Hans Wennborg via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> On Tue, Aug 11, 2015 at 1:41 PM, Hans Wennborg <hans at chromium.org> wrote:
>> > On Thu, Aug 6, 2015 at 1:56 PM, David Majnemer via cfe-commits
>> > <cfe-commits at lists.llvm.org> wrote:
>> >> Author: majnemer
>> >> Date: Thu Aug  6 15:56:55 2015
>> >> New Revision: 244266
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=244266&view=rev
>> >> Log:
>> >> [ItaniumCXXABI] Don't import RTTI data for classes with key functions
>> >>
>> >> MinGW has some pretty strange behvaior around RTTI and
>> >> dllimport/dllexport:
>> >> - RTTI data is never imported
>> >> - RTTI data is only exported if the class has no key function.
>> >>
>> >> Modified:
>> >>     cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
>> >>     cfe/trunk/test/CodeGenCXX/dllimport-rtti.cpp
>> >
>> > I tried to merge this to 3.7 (as discussed on the commit thread for
>> > r244488), but the test doesn't pass:
>> >
>> > --
>> >
>> /usr/local/google/work/llvm-3.7/cfe.src/test/CodeGenCXX/dllimport-rtti.cpp:22:13:
>> > error: expected string not found in input
>> > // GNU-DAG: @_ZTV1V = available_externally dllimport
>> >             ^
>> > <stdin>:1:1: note: scanning from here
>> > ; ModuleID =
>> '/usr/local/google/work/llvm-3.7/cfe.src/test/CodeGenCXX/dllimport-rtti.cpp'
>> > ^
>> > <stdin>:15:1: note: possible intended match here
>> > @_ZTV1S = available_externally dllimport unnamed_addr constant [3 x
>> > i8*] [i8* null, i8* bitcast (i8** @_ZTI1S to i8*), i8* bitcast (void
>> > (%struct.S*)* @_ZN1S1fEv to i8*)], align 4
>> > ^
>> > --
>> >
>> > I assume there's some other commit this depends on, but I haven't been
>> > able to figure out which. Can you take a look?
>>
>> Ping?
>>
>
> Looks like the test depends on r243090, which shouldn't go to the branch.
> I'd guess we could fix the test by changing that check line to "// GNU-DAG:
> @_ZTV1V = external" or similar. David?
>

external linkage works as long as it's still dllimport. I was just about to
give this a shot myself.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150818/ffe63f8b/attachment-0001.html>


More information about the cfe-commits mailing list