Go to file
Howard Hinnant 5a8b5783f8 G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler.
The issue this patch seeks to address is that MS's compiler (cl.exe) doesn't support the __attribute__((__weak__)) or __atribute__((__visibility__("default")) syntax; so a solution must be found where cl.exe doesn't see this syntax.

This patch seeks to solve this problem by changing code patterned like this:
__attribute__((__weak__, __visibility__("default")))
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { /*snip*/; return p; }

to code like this:
_LIBCPP_WEAK
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { return p; }

Howard:  Thanks for all the comments regarding the default visibility
tag on the definition.  I agree it isn't needed, and that there are lots
of other places where it is missing.  That being said, I'm not wanting
to rock the boat on that issue right now.  So I've added it back to the
definition via _LIBCPP_FUNC_VIS.  A later pass dedicated just to this
issue can bring things in to a consistent state one way or the other. 
Note that we do not want to have the exact same attributes on the
declaration and defintion in this case.  The declaration should not be
marked weak, whereas the definition should (which is what G M's patch
did). I've fully tested on OS X to ensure that the resultant attribute
syntax actually works.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192007 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 23:56:37 +00:00
cmake Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false. 2013-10-02 07:44:19 +00:00
include G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler. 2013-10-04 23:56:37 +00:00
lib [cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested. 2013-09-02 07:28:05 +00:00
src G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler. 2013-10-04 23:56:37 +00:00
test Make it possible to run the test suite when built as part of LLVM. 2013-10-03 21:58:25 +00:00
www Fixed bad link for n3789; thanks to Chip Davis for the catch 2013-09-28 01:52:18 +00:00
.arcconfig Add a simple .arcconfig to make using the 'arc' commandline tool and the 2012-12-31 05:59:45 +00:00
CMakeLists.txt libc++abi no longer has a cxa_demangle.h header. 2013-10-03 22:58:36 +00:00
CREDITS.TXT Updated my role 2013-09-28 01:25:55 +00:00
LICENSE.TXT Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
Makefile Change makefile comment to refer to libc++ instead of libcpp. 2013-04-23 19:26:55 +00:00