[cfe-dev] [PATCH] Libc++ Windows fixes
Aaron Ballman
aaron at aaronballman.com
Sun Oct 16 14:35:37 PDT 2011
On Sun, Oct 16, 2011 at 3:34 PM, Ruben Van Boxem
<vanboxem.ruben at gmail.com> wrote:
> 2011/10/16 Aaron Ballman <aaron at aaronballman.com>
>>
>> On Sun, Oct 16, 2011 at 2:26 PM, Ruben Van Boxem
>> <vanboxem.ruben at gmail.com> wrote:
>> > Fresh patch attached.
>> >
>> > --- include/__config (revision 141003)
>> > +++ include/__config (working copy)
>> >
>> > @@ -69,17 +71,45 @@
>> > # endif
>> > #endif // !defined(_LIBCPP_LITTLE_ENDIAN) ||
>> > !defined(_LIBCPP_BIG_ENDIAN)
>> >
>> > -#ifndef _LIBCPP_VISIBILITY_TAG
>> > -#define _LIBCPP_VISIBILITY_TAG 1
>> > +#if _WIN32
>> > +
>> > +// only really useful for a DLL
>> > +#ifdef _LIBCPP_DLL // this should be a compiler builtin define
>> > ideally...
>> > +# ifdef cxx_EXPORTS
>> > +# define _LIBCPP_HIDDEN
>> > +# define _LIBCPP_VISIBLE __cdecl(dllexport)
>> > +# else
>> > +# define _LIBCPP_HIDDEN
>> > +# define _LIBCPP_VISIBLE __cdecl(dllimport)
>> > +# endif
>> > +#else
>> > +# define _LIBCPP_HIDDEN
>> > +# define _LIBCPP_VISIBLE
>> > #endif
>>
>> I hadn't noticed this previously, but I'm unfamiliar with being able
>> to use the calling convention in place of __declspec. Is that
>> documented somewhere on MSDN?
>
> Wow, crap. those two are just too similar. My mistake. Compiler didn't
> complain though. Probably does not do what it should... Fixed patch
> attached. I'll blame it on the fact that today is sunday :/
I'm surprised the compiler didn't catch that! Regardless, the latest
patch looks great. Thanks!
~Aaron
More information about the cfe-dev
mailing list