On Thu, May 29, 2014 at 4:23 PM, Reid Kleckner <[email protected]> wrote: > On Thu, May 29, 2014 at 4:01 PM, Hans Wennborg <[email protected]> wrote: >> >> I tested my patch with Nico's tests from >> https://github.com/gix/clang/commit/ea6cb1d71c6ef8dac2afd5f40219de9460a92b3f, >> and fixed the two asserts we were hitting when exporting defaulted trivial >> constructors and destructors. >> >> There were two remaining test failures: 1) we emit RTTI type descriptor, >> etc. as weak_odr instead of linkonce_odr when exporting the class. Not a big >> deal since we're exporting the vtable anyway, but I'm not sure why it's >> happening. > > > It's pretty simple: I told Warren to use the vftable linkage for RTTI data.
That makes sense :) I'll see if I can add the dllexport case to that logic. > Can RTTI data be imported? What happens when you use typeid? MSVC doesn't export the RTTI data, so it can't be imported. When I use typeid it seems to materialize the things it needs, it doesn't try to import anything. > I seem to > recall they don't let you import the type descriptor and you have to use > string comparison on the mangled name to compare types for equality. In > that case, linkonce_odr is correct. Yes, I think linkonce_odr would be the correct one, but I don't think emitting it as weak_odr until we fix it is breaking anything. Since we're exporting the vtable, which references these things, we can't drop them anyway. Does the patch look good to you otherwise? _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
