<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 29, 2014 at 4:01 PM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tested my patch with Nico's tests from <a href="https://github.com/gix/clang/commit/ea6cb1d71c6ef8dac2afd5f40219de9460a92b3f" target="_blank">https://github.com/gix/clang/commit/ea6cb1d71c6ef8dac2afd5f40219de9460a92b3f</a>, and fixed the two asserts we were hitting when exporting defaulted trivial constructors and destructors.<br>

<br>
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.</blockquote>
<div><br></div><div>It's pretty simple: I told Warren to use the vftable linkage for RTTI data.  Can RTTI data be imported?  What happens when you use typeid?  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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2) for the MinGW ABI, we don't export the vtable for ExportDynamicClass, but we should.<br>
<br>
If folks think it's OK, it'd like to get this patch landed, let Nico commit his tests, and then continue addressing the issues above.<br>
<br>
(I had to updated Nico's tests with 'nonnull' to make them work, see the commit here: <a href="https://github.com/zmodem/clang/commit/c62c92967e608a4ff90d18887b848122c6efbeb8" target="_blank">https://github.com/zmodem/clang/commit/c62c92967e608a4ff90d18887b848122c6efbeb8</a>)<br>

<div class=""><br>
<a href="http://reviews.llvm.org/D3877" target="_blank">http://reviews.llvm.org/D3877</a><br>
<br>
Files:<br>
  include/clang/Basic/Attr.td<br>
  lib/CodeGen/CGCXX.cpp<br>
</div>  lib/CodeGen/CGClass.cpp<br>
  lib/CodeGen/CGVTables.cpp<br>
  lib/CodeGen/MicrosoftCXXABI.cpp<br>
  lib/Sema/SemaDeclCXX.cpp<br>
  lib/Sema/SemaExpr.cpp<br>
  test/CodeGenCXX/dllexport.cpp<br>
  test/CodeGenCXX/dllimport.cpp<br>
  test/SemaCXX/dllexport.cpp<br>
  test/SemaCXX/dllimport.cpp<br>
</blockquote></div><br></div></div>