libcxx: support typeids across DLL boundary

Yaron Keren yaron.keren at gmail.com
Fri Nov 22 13:48:21 PST 2013


OK, fixed.



2013/11/22 Reid Kleckner <rnk at google.com>

> Yes, this is just a property of COFF, so it should be _WIN32.



On Fri, Nov 22, 2013 at 5:18 AM, Yaron Keren <yaron.keren at gmail.com> wrote:

> On Windows, typeids are different between DLLs and EXEs, so comparing
> type_info* will work for typeids from the same compiled file but fail for
> typeids from a DLL and an executable. Among other things, exceptions are
> not caught by handlers since can_catch() returns false.
>
> Defining _LIBCXX_DYNAMIC_FALLBACK does not help since can_catch() calls
> is_equal() with use_strcmp=false so the string names are not compared.
>
> This patch compares typeids first (cheap) and only they are different
> calls strcmp.
>
> If libcxxabi with Visual C++ has the same problem, __MINGW32__ should be
> replaced with _WIN32 in both locations.
>
> Yaron
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131122/a263f689/attachment.html>


More information about the cfe-commits mailing list