Commit Graph

25 Commits

Author SHA1 Message Date
Richard Smith 2999ea0f04 PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.
llvm-svn: 249788
2015-10-09 00:26:50 +00:00
Richard Smith d6cffc4fe0 Split <stddef.h> out of <cstddef>.
There are a bunch of macros (__need_size_t etc) that request just one piece of
<stddef.h>; if any one of these is defined, we just directly include the
underlying header.

Note that <stddef.h> provides a ::nullptr_t. We don't want that available to
includers of <cstddef>, so instead of following the usual pattern where <cfoo>
includes <foo.h> then pulls things from :: into std:: with using-declarations,
we implement <stddef.h> and <cstddef> separately; both include <__nullptr> for
the definition of std::nullptr_t.

llvm-svn: 249761
2015-10-08 22:25:27 +00:00
Richard Smith c467d9b492 Factor definition of std::nullptr_t out of <cstddef> into a header that can also be used by <stddef.h>.
llvm-svn: 249737
2015-10-08 20:34:11 +00:00
Nico Weber 218f71e148 Update cstddef after clang r207606.
r207606 changed the __need_foo macros to behave like they do with gcc: If they
are set, _only_ the __need_foo stuff gets defined.  As a consequence, cstddef
no longer defined "offsetof".  It looks like the __need_foo defines aren't
needed anymore, so just remove them.

Fixes PR19723.

llvm-svn: 208942
2014-05-16 01:45:02 +00:00
Chandler Carruth 265b83a87f Teach libc++ to use the compiler-provided C-compatible ::max_align_t
rather than its own type for std::max_align_t. This is particularly
relevant as the types may not be ABI compatible despite users expecting
them to be.

llvm-svn: 201843
2014-02-21 08:37:30 +00:00
Howard Hinnant f0544c2086 Nico Rieck: this patch series fixes visibility issues on Windows as explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>.
llvm-svn: 188192
2013-08-12 18:38:34 +00:00
Howard Hinnant 6e41256f68 No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
llvm-svn: 176593
2013-03-06 23:30:19 +00:00
Howard Hinnant 54d333a601 Rename uses of _ and __ because these are getting stepped on by macros from other system code.
llvm-svn: 167038
2012-10-30 19:06:59 +00:00
Howard Hinnant 8e747d3671 Apply the emulated nullptr_t with constexpr. This is an unusual configuration that would take advantage of this. But it has popped up in the wild and does no harm to support it.
llvm-svn: 164575
2012-09-24 23:36:40 +00:00
Howard Hinnant 2a9a072485 Give the emulated nullptr_t a default constructor.
llvm-svn: 150893
2012-02-18 22:01:22 +00:00
Howard Hinnant 073458b1ab Windows support by Ruben Van Boxem.
llvm-svn: 142235
2011-10-17 20:05:10 +00:00
Howard Hinnant ce48a1137d _STD -> _VSTD to avoid macro clash on windows
llvm-svn: 134190
2011-06-30 21:18:19 +00:00
Howard Hinnant 32208bde75 Move nullptr_t to unversioned namespace: Sean Hunt
llvm-svn: 132665
2011-06-05 13:00:46 +00:00
Howard Hinnant 412dbebe1b license change
llvm-svn: 119395
2010-11-16 22:09:02 +00:00
Howard Hinnant c4931c4746 I have reverted all contributions made by Jesse Towner in revision 110724
llvm-svn: 119383
2010-11-16 21:10:23 +00:00
Howard Hinnant fb100021b7 visibility-decoration.
llvm-svn: 114486
2010-09-21 21:28:23 +00:00
Howard Hinnant b3371f6f49 Fixing whitespace problems
llvm-svn: 111750
2010-08-22 00:02:43 +00:00
Howard Hinnant eb2692571f patch by Jesse Towner, and bug fix by Sebastian Redl
llvm-svn: 110724
2010-08-10 20:48:29 +00:00
Howard Hinnant 8ae5097f81 for Ubuntu
llvm-svn: 105338
2010-06-02 18:53:22 +00:00
Howard Hinnant 2234ef3407 I've reverted the changes needed for Ubuntu. The changes for Ubuntu should go under a #if and I'm not sure what that #if should look like.
llvm-svn: 105337
2010-06-02 18:41:21 +00:00
Howard Hinnant bc3c5dc767 Fixed [support.types]. <cstddef> wasn't definining NULL or offsetof.
llvm-svn: 104982
2010-05-28 18:04:31 +00:00
Howard Hinnant 128ba7191d patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.
llvm-svn: 104516
2010-05-24 17:49:41 +00:00
Howard Hinnant e31e36f910 [rand.dist.norm.f]
llvm-svn: 104035
2010-05-18 17:32:30 +00:00
Howard Hinnant 5b08a8a432 Wiped out some non-ascii characters that snuck into the copyright.
llvm-svn: 103516
2010-05-11 21:36:01 +00:00
Howard Hinnant 3e519524c1 libcxx initial import
llvm-svn: 103490
2010-05-11 19:42:16 +00:00