Go to file
Howard Hinnant a942f2ffd7 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.

llvm-svn: 192007
2013-10-04 23:56:37 +00:00
clang Consumed Analysis: Change callable_when so that it can take a list of states 2013-10-04 21:28:06 +00:00
clang-tools-extra clang-apply-replacements: Fixing doxygen warning 2013-10-01 13:21:39 +00:00
compiler-rt [TSan] Automatically pick up llvm-symbolizer from PATH, as we do in another sanitizers 2013-10-04 13:38:35 +00:00
debuginfo-tests don't use CHECK-NEXT because it may be on the same line. 2013-09-18 23:01:54 +00:00
libclc Parenthesize arguments for mad_hi 2013-09-09 14:36:21 +00:00
libcxx 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
libcxxabi Adding bad_array_length to libc++abi 2013-09-11 01:42:02 +00:00
lld [ELF] Fix uninitalized value. 2013-10-03 19:25:34 +00:00
lldb <rdar://problem/12042982> 2013-10-04 23:14:13 +00:00
llvm [Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondition(). 2013-10-04 23:54:30 +00:00
openmp Update web pages to include style sheets and referenced documents missed before. 2013-10-03 11:55:28 +00:00
polly do not compute isl_map_dim in the loop 2013-10-04 17:14:53 +00:00