Commit Graph

1449 Commits

Author SHA1 Message Date
Eric Fiselier 43b121df05 Rename <__hash_table> traits so they don't conflict with similar traits.
In particular <__tree> defines many of the same types of traits classes.

llvm-svn: 261421
2016-02-20 07:59:16 +00:00
Eric Fiselier 0594ad713b Remove all usages of "const" node pointer typedefs in the assoc containers.
The "const" pointer typedefs such as "__node_const_pointer" and
"__node_base_const_pointer" are identical to their non-const pointer types.
This patch changes all usages of "const" pointer type names to their respective
non-const typedef.

Since "fancy pointers to const" cannot be converted back to a non-const pointer
type according to the allocator requirements it is important that we never
actually use "const" pointers.

Furthermore since "__node_const_pointer" and "__node_pointer" already
name the same type, it's very confusing to use both names. Especially
when defining const/non-const overloads for member functions.

llvm-svn: 261419
2016-02-20 07:12:17 +00:00
Eric Fiselier 089a7cc5de Cleanup node-type handling in the associative containers.
This patch is very similar to r260431.

This patch is the first in a series of patches that's meant to better
support map. map has a special "value_type" that
differs from pair<const Key, Value>. In order to meet the EmplaceConstructible
and CopyInsertable requirements we need to teach __tree about this
special value_type.

This patch creates a "__tree_node_types" traits class that contains
all of the typedefs needed by the associative containers and their iterators.
These typedefs include ones for each node type and  node pointer type,
as well as special typedefs for "map"'s value type.

Although the associative containers already supported incomplete types, this
patch makes it official by adding tests.

This patch will be followed up shortly with various cleanups within __tree and
fixes for various map bugs and problems.

llvm-svn: 261416
2016-02-20 05:28:30 +00:00
Eric Fiselier 39c193b1f0 Make __wrap_iter work with GCC again
Summary:
This bug was originally fixed in http://reviews.llvm.org/D7201. 

However it was broken again by the fix to https://llvm.org/bugs/show_bug.cgi?id=22605.

This patch re-fixes __wrap_iter with GCC by providing a forward declaration of <vector> before the friend declaration in __wrap_iter.
This patch avoids the issues in PR22605 by putting canonical forward declarations in <iosfwd> and including <iosfwd> in <vector>.

<iosfwd> was chosen as the canonical forward declaration headers for the following reasons:

1. `<iosfwd>` is small with almost no dependancies.
2. It already forward declares `std::allocator`
3. It is already included in `<iterator>` which we need to fix the GCC bug.

This patch fixes the test "gcc_workaround.pass.cpp"

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16345

llvm-svn: 261382
2016-02-20 00:19:45 +00:00
Eric Fiselier a6b7ebe2cd Add stdbool.h wrapper for libc++
Summary:
According to the C++ standard <stdbool.h> isn't allowed to define `true` `false` or `bool`. However these macros are sometimes defined by the compilers `stdbool.h`.

Clang defines the macros whenever `__STRICT_ANSI__` isn't defined (ie `-std=gnu++11`).
New GCC versions define the macros in C++03 mode only, older GCC versions (4.9 and before) always define the macros.

This patch adds a wrapper header for `stdbool.h` that undefs the required macros.

Reviewers: mclow.lists, rsmith, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16346

llvm-svn: 261381
2016-02-20 00:16:41 +00:00
Ben Craig b8aea04ef5 Split locale management out of newlib/xlocale.h. NFCI
This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.

For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.

The "do-nothing" / "nop" locale functions are also useful on their own for
other lightweight platforms. Putting these nop implementations in
support/xlocale should enable code sharing.

Unfortunately, I have no access to a newlib system to build and test with, so
this change has been made blind.

Reviewed: http://reviews.llvm.org/D17382
llvm-svn: 261231
2016-02-18 17:40:16 +00:00
Ben Craig 217946da98 Split locale management out of ibm/xlocale.h. NFCI
This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.

For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.

Unfortunately, I have no access to an AIX machine to build with, so this change
has been made blind. Also, the original author (Xing Xue) does not appear to
have a Phabricator account.

Reviewed: http://reviews.llvm.org/D17380
llvm-svn: 261230
2016-02-18 17:37:33 +00:00
Eric Fiselier 757373e676 Get <ext/hash_map> working again
llvm-svn: 261180
2016-02-18 00:20:34 +00:00
Daniel Sanders 4788179a2c [libcxx] Fix definition of regex_traits::__regex_word on big-endian glibc systems
Summary:
On glibc, the bits used for the various character classes is endian dependant
(see _ISbit() in ctypes.h) but __regex_word does not account for this and uses
a spare bit that isn't spare on big-endian. On big-endian, it overlaps with the
bit for graphic characters which causes '-', '@', etc. to be considered a word
character.

Fixed this by defining the value using _ISbit(15) on MIPS glibc systems. We've
restricted this to MIPS for now to avoid the risk of introducing failures in
other targets.

Fixes PR26476.

Reviewers: hans, mclow.lists

Subscribers: dsanders, cfe-commits

Differential Revision: http://reviews.llvm.org/D17132

llvm-svn: 261088
2016-02-17 13:16:31 +00:00
Richard Smith b1220c04cc Instead of asking glibc to provide correct C++ signatures for <string.h>
functions, ask it whether it did provide them after the fact. Some versions of
glibc fail to compile if you make this request and don't also claim to be at
least GCC 4.3.

llvm-svn: 260622
2016-02-11 23:51:02 +00:00
Eric Fiselier 0f90567744 Fix LWG issue 2469 - Use piecewise construction in unordered_map::operator[].
unordered_map's allocator may only be used to construct objects of 'value_type',
or in this case 'pair<const Key, Value>'. In order to respect this requirement
in operator[], which requires default constructing the 'mapped_type', we have
to use pair's piecewise constructor with '(tuple<Kep>, tuple<>)'.

Unfortunately we still need to provide a fallback implementation for C++03
since we don't have <tuple>. Even worse this fallback is the last remaining
user of '__hash_map_node_destructor' and '__construct_node_with_key'.

llvm-svn: 260601
2016-02-11 21:45:53 +00:00
Richard Smith 1b1c7e977f Work around regression in glibc 2.22: request that glibc provides the correct
prototypes for <string.h> functions that are converted into overload sets in
C++. This matches the existing workaround in <wchar.h>.

llvm-svn: 260570
2016-02-11 19:40:06 +00:00
Eric Fiselier 614ed76c37 Revert r260514 because it has a bogus commit message.
llvm-svn: 260556
2016-02-11 18:21:18 +00:00
Eric Fiselier 8e39768c21 Properly down-cast a sentinal node pointer through void*
llvm-svn: 260526
2016-02-11 15:22:37 +00:00
Eric Fiselier 45c4d45ead Teach __hash_table how to handle unordered_map's __hash_value_type.
This patch is fairly large and contains a number of changes. The main change
is teaching '__hash_table' how to handle '__hash_value_type'. Unfortunately
this change is a rampant layering violation, but it's required to make
unordered_map conforming without re-writing all of __hash_table.
After this change 'unordered_map' can delegate to '__hash_table' in almost all cases.

The major changes found in this patch are:

  * Teach __hash_table to differentiate between the true container value type
    and the node value type by introducing the "__container_value_type" and
    "__node_value_type" typedefs. In the case of unordered_map '__container_value_type'
    is 'pair<const Key, Value>' and '__node_value_type' is '__hash_value_type'.
    
  * Switch almost all overloads in '__hash_table' previously taking 'value_type'
    (AKA '__node_value_type) to take  '__container_value_type' instead. Previously
    'pair<K, V>' would be implicitly converted to '__hash_value_type<K, V>' because
    of the function signature.
    
  * Add '__get_key', '__get_value', '__get_ptr', and '__move' static functions to
    '__key_value_types'. These functions allow '__hash_table' to unwrap
    '__node_value_type' objects into '__container_value_type' and its sub-parts.

  * Pass  '__hash_value_type::__value_'  to 'a.construct(p, ...)' instead of
    '__hash_value_type' itself. The C++14 standard requires that 'a.construct()'
    and 'a.destroy()' are only ever instantiated for the containers value type.

  * Remove '__hash_value_type's constructors and destructors. We should never
    construct an instance of this type.
    (TODO this is UB but we already do it in plenty of places).
  
  * Add a generic "try-emplace" function to '__hash_table' called
    '__emplace_unique_key_args(Key const&, Args...)'.

  
The following changes were done as cleanup:

  * Introduce the '_LIBCPP_CXX03_LANG' macro to be used in place of
    '_LIBCPP_HAS_NO_VARIADICS' or '_LIBCPP_HAS_NO_RVALUE_REFERENCE'.
    
  * Cleanup C++11 only overloads that assume an incomplete C++11 implementation.
    For example this patch removes the __construct_node overloads that do
    manual pack expansion.
    
  * Forward 'unordered_map::emplace' to '__hash_table' and remove dead code
    resulting from the change. This includes almost all
    'unordered_map::__construct_node' overloads.


The following changes are planed for future revisions:

  * Fix LWG issue #2469 by delegating 'unordered_map::operator[]' to use
    '__emplace_unique_key_args'.
    
  * Rewrite 'unordered_map::try_emplace' in terms of '__emplace_unique_key_args'.
  
  * Optimize '__emplace_unique' to call '__emplace_unique_key_args' when possible.
    This prevent unneeded allocations when inserting duplicate entries.


The additional follow up work needed after this patch:

  * Respect the lifetime rules for '__hash_value_type' by actually constructing it.
  * Make '__insert_multi' act similar to '__insert_unique' for objects of type
    'T&' and 'T const &&' with 'T = __container_value_type'.
  
  

llvm-svn: 260514
2016-02-11 12:25:27 +00:00
Eric Fiselier fcd0221118 Teach __hash_table how to handle unordered_map's __hash_value_type.
This patch is fairly large and contains a number of changes. The main change
is teaching '__hash_table' how to handle '__hash_value_type'. Unfortunately
this change is a rampant layering violation, but it's required to make
unordered_map conforming without re-writing all of __hash_table.
After this change 'unordered_map' can delegate to '__hash_table' in almost all cases.

The major changes found in this patch are:

  * Teach __hash_table to differentiate between the true container value type
    and the node value type by introducing the "__container_value_type" and
    "__node_value_type" typedefs. In the case of unordered_map '__container_value_type'
    is 'pair<const Key, Value>' and '__node_value_type' is '__hash_value_type'.
    
  * Switch almost all overloads in '__hash_table' previously taking 'value_type'
    (AKA '__node_value_type) to take  '__container_value_type' instead. Previously
    'pair<K, V>' would be implicitly converted to '__hash_value_type<K, V>' because
    of the function signature.
    
  * Add '__get_key', '__get_value', '__get_ptr', and '__move' static functions to
    '__key_value_types'. These functions allow '__hash_table' to unwrap
    '__node_value_type' objects into '__container_value_type' and its sub-parts.

  * Pass  '__hash_value_type::__value_'  to 'a.construct(p, ...)' instead of
    '__hash_value_type' itself. The C++14 standard requires that 'a.construct()'
    and 'a.destroy()' are only ever instantiated for the containers value type.

  * Remove '__hash_value_type's constructors and destructors. We should never
    construct an instance of this type.
    (TODO this is UB but we already do it in plenty of places).
  
  * Add a generic "try-emplace" function to '__hash_table' called
    '__emplace_unique_key_args(Key const&, Args...)'.

  
The following changes were done as cleanup:

  * Introduce the '_LIBCPP_CXX03_LANG' macro to be used in place of
    '_LIBCPP_HAS_NO_VARIADICS' or '_LIBCPP_HAS_NO_RVALUE_REFERENCE'.
    
  * Cleanup C++11 only overloads that assume an incomplete C++11 implementation.
    For example this patch removes the __construct_node overloads that do
    manual pack expansion.
    
  * Forward 'unordered_map::emplace' to '__hash_table' and remove dead code
    resulting from the change. This includes almost all
    'unordered_map::__construct_node' overloads.


The following changes are planed for future revisions:

  * Fix LWG issue #2469 by delegating 'unordered_map::operator[]' to use
    '__emplace_unique_key_args'.
    
  * Rewrite 'unordered_map::try_emplace' in terms of '__emplace_unique_key_args'.
  
  * Optimize '__emplace_unique' to call '__emplace_unique_key_args' when possible.
    This prevent unneeded allocations when inserting duplicate entries.


The additional follow up work needed after this patch:

  * Respect the lifetime rules for '__hash_value_type' by actually constructing it.
  * Make '__insert_multi' act similar to '__insert_unique' for objects of type
    'T&' and 'T const &&' with 'T = __container_value_type'.
  
  

llvm-svn: 260513
2016-02-11 11:59:44 +00:00
Eric Fiselier d262b368d5 Remove changes that snuck in within r260431
llvm-svn: 260443
2016-02-10 21:58:36 +00:00
Evgeniy Stepanov 3e58a6a7b2 Fix invalid casts in <functional>.
static_cast of a pointer to object before the start of the object's
lifetime has undefined behavior.

This code triggers CFI warnings.

This change replaces C-style casts with reinterpret_cast, which is
fine per the standard, add applies an attribute to silence CFI (which
barks on reinterpret_cast, too).

llvm-svn: 260441
2016-02-10 21:53:28 +00:00
Eric Fiselier 75d0dcfde7 Recommit r260012 - Cleanup node-type handling in the unordered containers.
This time I kept <ext/hash_map> working!

This patch is the first in a series of patches that's meant to better
support unordered_map. unordered_map has a special "value_type" that
differs from pair<const Key, Value>. In order to meet the EmplaceConstructible
and CopyInsertable requirements we need to teach __hash_table about this
special value_type.

This patch creates a "__hash_node_types" traits class that contains
all of the typedefs needed by the unordered containers and it's iterators.
These typedefs include ones for each node type and  node pointer type,
as well as special typedefs for "unordered_map"'s value type.

As a result of this change all of the unordered containers now all support
incomplete types.

As a drive-by fix I changed the difference_type in __hash_table to always
be ptrdiff_t. There is a corresponding change to size_type but it cannot
take affect until an ABI break.

This patch will be followed up shortly with fixes for various unordered_map
bugs and problems.

llvm-svn: 260431
2016-02-10 20:46:23 +00:00
Ben Craig d32611211d Limit catopen usage to unix-like OSes
Operating systems that are not unix-like are unlikely to have access to
catopen. Instead of black-listing each one, we now filter out all non-unix
operating systems first. We then exclude the unix-like operating systems
that don't have catopen. _WIN32 counts as a unix-like operating system
because of cygwin.

http://reviews.llvm.org/D16639

llvm-svn: 260381
2016-02-10 13:47:25 +00:00
Richard Smith 5fd17ab1b0 Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from
<string.h> and wcschr, wcspbrk, wcsrchr, wmemchr, and wcsstr from <wchar.h> to
provide a const-correct overload set even when the underlying C library does
not.

This change adds a new macro, _LIBCPP_PREFERRED_OVERLOAD, which (if defined)
specifies that a given overload is a better match than an otherwise equally
good function declaration without the overload. This is implemented in modern
versions of Clang via __attribute__((enable_if)), and not elsewhere.

We use this new macro to define overloads in the global namespace for these
functions that displace the overloads provided by the C library, unless we
believe the C library is already providing the correct signatures.

llvm-svn: 260337
2016-02-10 00:59:02 +00:00
Saleem Abdulrasool 38fc9fe197 Use the reserved spellings for attributes
Change the no_sanitize attribute to use the reserved spelling.

llvm-svn: 260195
2016-02-09 04:05:37 +00:00
Eric Fiselier 20af59e38c Revert r260012 due to __gnu_cxx::hash_map breakage
llvm-svn: 260172
2016-02-08 23:47:13 +00:00
Eric Fiselier 1b2e4ffa58 Cleanup node-type handling in the unordered containers
This patch is the first in a series of patches that's meant to better
support unordered_map. unordered_map has a special "value_type" that
differs from pair<const Key, Value>. In order to meet the EmplaceConstructible
and CopyInsertable requirements we need to teach __hash_table about this
special value_type.

This patch creates a "__hash_node_types" traits class that contains
all of the typedefs needed by the unordered containers and it's iterators.
These typedefs include ones for each node type and  node pointer type,
as well as special typedefs for "unordered_map"'s value type.

As a result of this change all of the unordered containers now all support
incomplete types.

As a drive-by fix I changed the difference_type in __hash_table to always
be ptrdiff_t. There is a corresponding change to size_type but it cannot
take affect until an ABI break.

This patch will be followed up shortly with fixes for various unordered_map
fixes.

llvm-svn: 260012
2016-02-07 00:36:33 +00:00
Duncan P. N. Exon Smith f42ef3efca re.results.form: Format out-of-range subexpression references as null
Rather than crashing in match_results::format() when a reference to a
marked subexpression is out of range, format the subexpression as empty
(i.e., replace it with an empty string).  Note that
match_results::operator[]() has a range-check and returns a null match
in this case, so this just re-uses that logic.

llvm-svn: 259682
2016-02-03 19:30:20 +00:00
Marshall Clow 21c38f261f Left a file out of r259014
llvm-svn: 259015
2016-01-28 04:15:35 +00:00
Eric Fiselier 4de5f98699 Fix broken commit r258888. I missed adding two pointer conversions
llvm-svn: 258893
2016-01-27 00:49:20 +00:00
Eric Fiselier 07b9cd36fa [libcxx] Fix undefined behavior in forward_list
Summary:
This patch is similar to the <list> fix but it has a few differences. This patch doesn't use a `__link_pointer` typedef because we don't need to change the linked list pointers because `forward_list` never stores a  `__forward_begin_node` in the linked list itself. 

The issue with `forward_list` is that the iterators store pointers to `__forward_list_node` and not `__forward_begin_node`. This is incorrect because `before_begin()` and `cbefore_begin()` return iterators that point to a `__forward_begin_node`. This means we incorrectly downcast the `__forward_begin_node` pointer to a `__node_pointer`. This downcast itself is sometimes UB but it cannot be safely removed until ABI v2. The more common cause of UB is when we deference the downcast pointer. (for example `__ptr_->__next_`). This can be fixed without an ABI break by upcasting `__ptr_` before accessing it.

The fix is as follows:

1. Introduce a `__iter_node_pointer` typedef that works  similar to `__link_pointer` in the last patch. In ABI v2 it is always a typedef for `__begin_node_pointer`.
2. Change the `__before_begin()` method to return the correct pointer type (`__begin_node_pointer`),
    Previously it incorrectly downcasted  the  `__forward_begin_node` to a `__node_pointer`  so it could be used to constructor the iterator types.
3. Change `__forward_list_iterator` and `__forward_list_const_iterator`  in the following way:
    1. Change `__node_pointer __ptr_;` member to  have the `__iter_node_pointer` type instead. 
    2. Add additional private constructors that accept `__begin_node_pointer` in addition to `__node_pointer` and then correctly cast them to the stored `__iter_node_pointer` type. 
    3. Add  `__get_begin()` and `__get_node_unchecked()` accessor methods that correctly cast `__ptr_` to the expected pointer type. `__get_begin()` is always safe to use and should be 
       preferred. `__get_node_unchecked()` can only be used on a deferencible iterator.
4. Replace direct access to `__forward_list_iterator::__ptr_`  with the safe accessor methods.
  


Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15836

llvm-svn: 258888
2016-01-27 00:11:54 +00:00
Eric Fiselier 0d662acc7c Remove dead code missed in r258852.
llvm-svn: 258855
2016-01-26 20:31:01 +00:00
Eric Fiselier 060cc200d0 Fix PR26103 - Error calling is_convertible with incomplete type. Patch from Michael Daniels.
llvm-svn: 258852
2016-01-26 20:24:30 +00:00
Marshall Clow 0aa1ccb0d9 Implement LWG#2385; remove the allocator-aware std::function::assign call. It was useless, and didn't actually *do anything* with the allocator. Now it's gone. On the off chance that someone is mistakenly calling it, it's only gone in C++1z
llvm-svn: 258697
2016-01-25 17:29:55 +00:00
Duncan P. N. Exon Smith ad783ce909 Revert "unordered_map: Reuse insert logic in emplace when possible, NFC"
This reverts commit r258575.  EricWF sent me an email (no link since it
was off-list) requesting to review this pre-commit instead of
post-commit.

llvm-svn: 258625
2016-01-23 15:12:47 +00:00
Duncan P. N. Exon Smith 8af8a407fe unordered_map: Reuse insert logic in emplace when possible, NFC
An upcoming commit will add an optimization to insert() that avoids
unnecessary mallocs when we can safely extract the key type.  This
commit shares code between emplace() and insert():
- if emplace() is given a single argument, and
- value_type is constructible from that argument
so that we have a single code path for the two.

I also updated the debug version of emplace_hint() to defer to
emplace(), like the non-debug version does.

In both cases, there should be NFC here.

llvm-svn: 258575
2016-01-22 22:48:02 +00:00
Duncan P. N. Exon Smith a584f0008a unordered: Rename __construct_node_hash() to allow forwarding, NFC
Rename the version of __construct_node() that takes a hash as an
argument to __construct_node_hash(), and use perfect-forwarding when
Rvalue references are available.  The primary motivation is to allow
other types through, since unordered_map's value_type is different from
__hash_table's value_type -- a follow-up will take advantage of this --
but the rename is general "goodness".

There should be no functionality change here (aside from enabling the
follow-up).

llvm-svn: 258511
2016-01-22 18:27:26 +00:00
Eric Fiselier d033ad21d0 Add __uncvref type for use in later patches
llvm-svn: 258491
2016-01-22 06:25:47 +00:00
Marshall Clow fcdb19904c Implement LWG#2101 'Some transformation types can produce impossible types' Introduced a new (internal) type trait '__is_referenceable' with tests. Use that trait in add_lvalue_reference, add_rvalue_reference and add_pointer.
llvm-svn: 258418
2016-01-21 18:22:43 +00:00
Marshall Clow b414b2f54b Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262
llvm-svn: 258107
2016-01-19 00:50:37 +00:00
Jonathan Roelofs 8dfe504bad Tame a -Wunknown-attributes warning
llvm-svn: 257707
2016-01-13 23:27:08 +00:00
Marshall Clow 76b4afc040 Fix PR#25973 : 'basic_string::assign(InputIt, InputIt) doesn't provide the strong exception safety guarantee'. This turned out to be a pervasive problem in <string>, which required a fair amount of rework. Add in an optimization for when iterators provide noexcept increment/comparison/assignment/dereference (which covers many of the iterators in libc++). Reviewed as http://reviews.llvm.org/D15862
llvm-svn: 257682
2016-01-13 21:54:34 +00:00
Hans Wennborg 3f01e7a62e Update version to 3.9
llvm-svn: 257629
2016-01-13 17:33:21 +00:00
Dan Gohman 4a9e173e08 [WebAssembly] Set std::numeric_limits's traps field for WebAssembly.
WebAssembly's integer division instruction traps on division by zero; set the
traps field of integral std::numeric_limits to true.

llvm-svn: 257612
2016-01-13 16:32:00 +00:00
Marshall Clow 7087a51b13 Put the definition of _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK in the right place.
llvm-svn: 257422
2016-01-12 00:38:04 +00:00
Marshall Clow ec880422df Preemptively disable unsigned integer sanitization in 32 and 64 bit versions of __murmur2_or_cityhash. This lets people use the unsigned integer overflow checker in UBSAN w/o getting hits from libc++'s hash code (where the unsigned integer overflow is legal and deliberate)> Patch by @danielaustin. Reviewed as: http://reviews.llvm.org/D15973
llvm-svn: 257368
2016-01-11 19:27:10 +00:00
Evgeniy Stepanov c86b392078 Revert "Remove visibility attributes from out-of-class method definitions in iostreams."
llvm-svn: 257193
2016-01-08 19:21:02 +00:00
Marshall Clow afc9ff99ec First half of LWG#2354: 'Unnecessary copying when inserting into maps with braced-init syntax'
llvm-svn: 256859
2016-01-05 19:32:41 +00:00
Eric Fiselier 5243e190a7 Remove unsafe "__as_link()" cast member function.
"__as_link()" can only be used safely on "__list_node" objects. This patch
moves the "__as_link()" member function from "__list_node_base" to "__list_node"
so it cannot be used incorrectly.

Unsafe downcasts now use a non-member function so we don't defer the type-punned
pointer.

llvm-svn: 256727
2016-01-04 03:27:52 +00:00
Eric Fiselier 934b092186 Use __rebind_pointer to avoid #ifdef block
llvm-svn: 256654
2015-12-30 21:52:00 +00:00
Eric Fiselier b88ea354fe [libcxx] Fix for ALL undefined behavior in <list>.
Summary:
This patch fixes std::list for builtin pointer types in the current ABI version and fixes std::list for all fancy pointer types in the next ABI version. The patch was designed to minimize the amount of code needed to support both ABI configurations. Currently only ~5 lines of code differ.


Reviewers: danalbert, jroelofs, mclow.lists

Subscribers: dexonsmith, awi, cfe-commits

Differential Revision: http://reviews.llvm.org/D12299

llvm-svn: 256652
2015-12-30 20:57:59 +00:00
Eric Fiselier 7a608aa232 [libcxx] Fix LWG Issue #2367 - Fixing std::tuple and std::pair's default constructors.
Summary: This patch implements the solution for LWG Issue #2367. See http://cplusplus.github.io/LWG/lwg-active.html#2367

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D13750

llvm-svn: 256325
2015-12-23 08:20:26 +00:00
Eric Fiselier 545b8861fc [libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
Review: http://reviews.llvm.org/D14839
llvm-svn: 255941
2015-12-18 00:36:55 +00:00
Eric Fiselier e2e332a50e Make noexcept specifications on __hash_table definitions match their declarations.
llvm-svn: 255738
2015-12-16 00:53:04 +00:00
Eric Fiselier af5b54a249 Workaround nasty GCC bug that caused testsuite to hang
llvm-svn: 255734
2015-12-16 00:35:45 +00:00
Eric Fiselier 8087ddd1e6 Remove unused _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS macro
llvm-svn: 255686
2015-12-15 22:19:03 +00:00
Eric Fiselier 8dcfcf79ab [libcxx] Enable noexcept for GCC 4.6 and greater
Summary:
This patch allows GCC 4.6 and above to use `noexcept` as opposed to `throw()`. 

Is it an ABI safe change to suddenly switch on `noexcept`? I imagine it must be because it's disabled in w/ clang in C++03 but not C++11.


Reviewers: danalbert, jroelofs, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15516

llvm-svn: 255683
2015-12-15 22:16:47 +00:00
Eric Fiselier fd10d98ed0 Mark declarations of externally instantiated functions as inline so GCC doesn't complain.
llvm-svn: 255599
2015-12-15 01:41:41 +00:00
Eric Fiselier 831c112954 Fix various GCC mis-configurations for newer versions.
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:

1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.

llvm-svn: 255585
2015-12-15 00:32:21 +00:00
Marshall Clow 25090a91bb Missed this on the previous (255517) commit
llvm-svn: 255518
2015-12-14 18:02:23 +00:00
Marshall Clow 94b5bc4263 Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
llvm-svn: 255517
2015-12-14 18:01:56 +00:00
Eric Fiselier 6a8678edee Remove redundant _LIBCPP_ALWAYS_INLINE attribute from __convert_to_integral overloads
llvm-svn: 255185
2015-12-10 00:43:37 +00:00
Evgeniy Stepanov 26ba3870bf Remove visibility attributes from out-of-class method definitions in iostreams.
No point in pretending that these methods are hidden - they are
actually exported from libc++.so. Extern template declarations make
them part of libc++ ABI.

This patch does not change libc++.so export list (at least on Linux).

llvm-svn: 255177
2015-12-09 23:42:30 +00:00
Evgeniy Stepanov 02b8e94943 Add 3 more missing inline/visibility attributes.
These are the cases when an out-of-class definition of a method is
marked _LIBCPP_INLINE_VISIBILITY, but the in-class declaration is
not. This will start failing when (or if) we switch to
attribute((internal_linkage)).

llvm-svn: 255166
2015-12-09 22:32:36 +00:00
Eric Fiselier fff5ec035b Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.
llvm-svn: 255162
2015-12-09 22:03:06 +00:00
Marshall Clow b8427293df Last bit of P0006; mark it as complete
llvm-svn: 254290
2015-11-30 05:39:30 +00:00
Marshall Clow 12dff9e66a Fix bugs in alignment_of_v, etc. Re-enable the newly added tests
llvm-svn: 254289
2015-11-30 05:20:00 +00:00
Marshall Clow 825a9edb2e Missing file from last commit
llvm-svn: 254286
2015-11-30 05:04:48 +00:00
Marshall Clow e12a536d76 Implement more of P0006; Type Traits Variable Templates.
llvm-svn: 254283
2015-11-30 04:30:02 +00:00
Marshall Clow 94f89aeec5 Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this.
llvm-svn: 254119
2015-11-26 01:24:04 +00:00
Vasileios Kalintiris 08010b5a0c Use libcxx's default rune table with the Musl C library.
Summary:
Also, there are no exported character type tables from Musl so we have to
Fallback to the standard functions. This reduces the number of libcxx's
test-suite failures down to ~130 for MIPS. Most of the remaining failures
come from the atomics (due to the lack of 8-byte atomic-ops in MIPS32) and
thread tests.

Reviewers: mclow.lists, EricWF, dalias, jroelofs

Subscribers: tberghammer, danalbert, srhines, cfe-commits

Differential Revision: http://reviews.llvm.org/D14926

llvm-svn: 253972
2015-11-24 10:24:54 +00:00
Marshall Clow bfb3f2bf7d Fix some mistakes in the <utility> and <tuple> synopses. No functional change. Thannks to K-ballo for the patch
llvm-svn: 253593
2015-11-19 19:45:29 +00:00
Marshall Clow 5fcc8169ed Fix some mistakes in the <array> synopsis. No functional change. Thanks to K-ballo for the patch
llvm-svn: 253592
2015-11-19 19:41:04 +00:00
Marshall Clow dbd2d32892 Implement P0007: Constant View: A proposal for a std::as_const helper function template.
llvm-svn: 253274
2015-11-17 00:08:08 +00:00
Marshall Clow dd1b261f3a Implement P0013R1: Logical Operator Type Traits. Make a hidden implementation (__and_, __or_, and __not_) so that we can use them elsewhere in non-C++17 code - for example, in the LFTS
llvm-svn: 253215
2015-11-16 15:54:13 +00:00
Marshall Clow 183c010c9a Implement P0074: Making owner_less more flexible
llvm-svn: 252905
2015-11-12 15:56:44 +00:00
Marshall Clow d17405fe9c Walter pointed out some missing includes in the tests. Fixing the includes uncovered a couple bugs in the _v type traits. Fixed those, too
llvm-svn: 252612
2015-11-10 15:48:23 +00:00
Vasileios Kalintiris 8c58e92cd8 Add initial support for the MUSL C library.
Summary:
This patch adds the LIBCXX_LIBC_IS_MUSL cmake option to allow the
building of libcxx with the Musl C library. The option is necessary as
Musl does not provide any predefined macro in order to test for its
presence, like GLIBC. Most of the changes specify the correct path to
choose through the various #if/#else constructs in the locale code.

Depends on D13407.

Reviewers: mclow.lists, jroelofs, EricWF

Subscribers: jfb, tberghammer, danalbert, srhines, cfe-commits

Differential Revision: http://reviews.llvm.org/D13673

llvm-svn: 252457
2015-11-09 10:21:04 +00:00
Marshall Clow e5f1288fa0 Implement LWG#2353: std::next is over-constrained
llvm-svn: 252407
2015-11-07 17:48:49 +00:00
Marshall Clow 8be59af1ed More of P0006R0: type traits variable aliases for C++17.
llvm-svn: 252406
2015-11-07 17:44:36 +00:00
Evgeniy Stepanov 906c872db9 Cleanup: move visibility/linkage attributes to the first declaration.
This change moves visibility attributes from out-of-class method
definitions to in-class declaration. This is needed for a switch to
attribute((internal_linkage)) (see http://reviews.llvm.org/D13925)
which can only appear on the first declaration.

This change does not touch istream/ostream/streambuf. They are
handled separately in http://reviews.llvm.org/D14409.

llvm-svn: 252385
2015-11-07 01:22:13 +00:00
Evgeniy Stepanov 65da7bc392 Allow deque to handle incomplete types.
Allow deque and deque::iterator instantiation with incomplete element
type. This is an ABI breaking change, and it is only enabled if
LIBCXX_ABI_VERSION >= 2 or LIBCXX_ABI_UNSTABLE=ON.

llvm-svn: 252350
2015-11-06 22:02:29 +00:00
Eric Fiselier 60506cbcd4 Cleanup foo.h headers and __config to work in C
llvm-svn: 252274
2015-11-06 06:30:12 +00:00
Marshall Clow 2cd0d6d625 Implement P0092R1 for C++1z
llvm-svn: 252195
2015-11-05 19:33:59 +00:00
Marshall Clow def501d1ca Make reverse() call iter_swap like the standard says, instead of calling swap directly. No real change.
llvm-svn: 251836
2015-11-02 21:34:25 +00:00
Marshall Clow dd0ef09954 Implement the first part of P0006R0: Adopt Type Traits Variable Templates for C++17. Significantly augment the existing tests.
llvm-svn: 251766
2015-11-01 20:24:59 +00:00
Richard Smith 25cb32091c Revert r249929 ("Split <string.h> out of <cstring>").
This change caused problems when building code like povray that:
a) uses 'using namespace std;'
b) is built on an environment where the C library provides the "wrong"
   (non-const-correct) interface for the str* functions
c) makes an unqualified call to one of those str* functions

A patch is out for review to add a facility to fix this (and to give the
correct signatures for these functions whenever possible, even when the C
library does not do so). This revert is expected to be temporary.

llvm-svn: 251665
2015-10-29 23:32:29 +00:00
Marshall Clow 131733bcf0 Implement P0004R1 'Remove Deprecated iostreams aliases'
llvm-svn: 251618
2015-10-29 05:43:30 +00:00
Marshall Clow 3b72a6ef63 Fix LWG#2489: mem_fn() should be noexcept
llvm-svn: 251257
2015-10-25 20:12:16 +00:00
Marshall Clow cd5215d8c4 Fix LWG#2476: scoped_allocator_adaptor is not assignable
llvm-svn: 251253
2015-10-25 19:52:47 +00:00
Marshall Clow b631c24359 Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect
llvm-svn: 251252
2015-10-25 19:34:04 +00:00
Marshall Clow 2603b0758d Fix LWG#2127: Move-construction with raw_storage_iterator.
llvm-svn: 251247
2015-10-25 18:58:07 +00:00
Marshall Clow 9be5356452 Fix LWG#2244: basic_istream::seekg
llvm-svn: 251246
2015-10-25 18:31:51 +00:00
Marshall Clow 1c4526757e Detect relaxed constexpr rules for gcc versions
llvm-svn: 250802
2015-10-20 07:37:11 +00:00
Eric Fiselier d97b084bb7 Fix GCC atomic implementation in C++03
llvm-svn: 250279
2015-10-14 08:36:22 +00:00
Evgeniy Stepanov a66a7b30ce ABI versioning macros for libc++.
C++ macros and CMake options that specify the default ABI version of
the library, and can be overridden to pick up new ABI-changing
features.

llvm-svn: 250254
2015-10-13 23:48:28 +00:00
Richard Smith f157e47fb8 Fix use of libc++ <foo.h> headers from within an 'extern "C"' context in C++98.
Previously, this resulted in us declaring a template for static_assert emulation within the 'extern "C"' context, which is ill-formed.

llvm-svn: 250247
2015-10-13 23:12:22 +00:00
Richard Smith d3a7bfcde5 Remove __config module to avoid #include cycle when libc headers include libc++'s <foo.h> headers.
llvm-svn: 250236
2015-10-13 22:13:33 +00:00
Eric Fiselier f9f796e79b [libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,

This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.

Please read the design documentation added in this patch for a description of how it works.

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits

Differential Revision: http://reviews.llvm.org/D13407

llvm-svn: 250235
2015-10-13 22:12:02 +00:00
Richard Smith 0ecae015ff Unrevert r249889, and XFAIL the test for Darwin, where the libc apparently doesn't provide a correct overload set for some functions.
llvm-svn: 249932
2015-10-10 01:39:51 +00:00
Richard Smith da231b4a3c Split <string.h> out of <cstring>.
Also fix the overload set for the five functions whose signatures change in the
case where we can fix it. This is already covered by existing tests for the
affected systems.

llvm-svn: 249929
2015-10-10 01:25:31 +00:00
Manman Ren 79d8bc4c88 Revert r249889 due to bot failure.
llvm-svn: 249926
2015-10-10 01:03:55 +00:00
Richard Smith a6e8ebb0d9 Split <wctype.h> out of <cwctype>.
llvm-svn: 249890
2015-10-09 19:57:37 +00:00
Richard Smith 897758d6ba Split <wchar.h> out of <cwchar>.
llvm-svn: 249889
2015-10-09 19:56:37 +00:00
Richard Smith a51c8eee6e Split <stdlib.h> out of <cstdlib>.
llvm-svn: 249800
2015-10-09 01:41:45 +00:00
Richard Smith d32827408e Split <stdio.h> out of <cstdio>.
As with <stddef.h>, skip our custom header if __need_FILE or __need___FILE is defined.

llvm-svn: 249798
2015-10-09 01:29:09 +00:00
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 239ab3c03f Fix incorrect file header. This is <cfenv> not <cctype>.
llvm-svn: 249749
2015-10-08 21:17:21 +00:00
Richard Smith 38a2a28ff7 Split <setjmp.h> out of <csetjmp>.
llvm-svn: 249743
2015-10-08 20:41:26 +00:00
Richard Smith 524956bb3d Split <math.h> out of <cmath>.
llvm-svn: 249742
2015-10-08 20:40:34 +00:00
Richard Smith 37df7a05c2 Split <inttypes.h> out of <cinttypes>.
llvm-svn: 249741
2015-10-08 20:38:53 +00:00
Richard Smith 33700e640c Split <float.h> out of <cfloat>.
llvm-svn: 249740
2015-10-08 20:37:44 +00:00
Richard Smith 3cb38811ea Split <errno.h> out of <cerrno>.
llvm-svn: 249739
2015-10-08 20:37:11 +00:00
Richard Smith f80c1b7331 Split <ctype.h> out of <cctype>.
llvm-svn: 249738
2015-10-08 20:36:30 +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
Richard Smith 1607bb38b6 Remove unnecessary inline functions capturing the contents of C library macros.
The C standard requires that these be provided as functions even if they're
also provided as macros, and a strict reading of the C++ standard library rules
suggests that (for instance) &::isdigit == &::std::isdigit, so these wrappers
are technically non-conforming.

llvm-svn: 249475
2015-10-06 22:03:22 +00:00
Marshall Clow 8428a9d5b6 Implement LWG#2063, and update the issues links to point to the github generated pages
llvm-svn: 249325
2015-10-05 16:17:34 +00:00
Eric Fiselier 2d6c0e79f7 [libcxx] Attempt to fix __throw_future_error in C++03
Summary:
Hi Marshall,

Could you please test this patch and see if you run into the same linker errors we talked about?
I can't reproduce on linux or OS X.

Hopefully you can't find any problems and we can fix the C++03 bot.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D13337

llvm-svn: 249192
2015-10-02 21:25:15 +00:00
Eric Fiselier 5c736fe9ab Fix initialzation order in dynarray
llvm-svn: 248988
2015-10-01 07:29:38 +00:00
Marshall Clow 286a74e93d Fix Typo in GCC no RTTI detection. Fixes PR#24901. Thanks to Bernhard Rosenkraenzer for the report and the patch.
llvm-svn: 248329
2015-09-22 21:58:30 +00:00
Eric Fiselier 56465abe13 Remove possible trailing padding from aligned_storage. Patch from Yiran Wang
llvm-svn: 248309
2015-09-22 18:37:03 +00:00
Marshall Clow 0510a5adc8 Change pair::swap(pair&) to call ADL swap instead of iter_swap; this fixes an obscure bug having to do with overloaded operator&. Fixes PR#24890
llvm-svn: 248304
2015-09-22 17:50:11 +00:00
Eric Fiselier 927a11e380 Fix <atomic> with -pedantic-errors
llvm-svn: 248240
2015-09-22 03:15:35 +00:00
Dan Albert 5e61cfdb9e Add endianness configuration block for GCC.
Previously GCC using libc++ would just leak endian.h for every
include.

llvm-svn: 247827
2015-09-16 18:10:47 +00:00
Marshall Clow f44bd93bec Implementation of Boyer-Moore and Boyer-Moore-Horspool searchers for the LFTS.
llvm-svn: 247036
2015-09-08 17:59:09 +00:00
Eric Fiselier 21dfbfb426 make common_type SFINAE-friendly and support void. Patch from Agustin Berge.
This patch also fixes PR22135. (https://llvm.org/bugs/show_bug.cgi?id=22135)
See the review for more information: http://reviews.llvm.org/D6964

llvm-svn: 246977
2015-09-08 00:13:57 +00:00
Marshall Clow a0daa7394e Make a helper routine __throw_future_error, and encapsulate the #ifdef _LIBCPP_NO_EXCEPTIONS there, instead of duplicating it throughout the code. No functionality change
llvm-svn: 246772
2015-09-03 15:11:32 +00:00
Marshall Clow cd7c3e671b Remove unused code. NFC
llvm-svn: 246445
2015-08-31 14:43:41 +00:00
Eric Fiselier 888d91a9e4 Move __lazy_* metafunctions to type traits and add tests
llvm-svn: 246408
2015-08-31 03:50:31 +00:00
Eric Fiselier e57e3aebe3 Fix most GCC warnings during build. Only -Wattribute left.
llvm-svn: 246280
2015-08-28 07:02:42 +00:00
Eric Fiselier d48306e704 [libcxx] Constrain unique_ptr::operator=(unique_ptr<Tp, Dp>) in C++03 mode
Summary:
This patch properly constrains the converting assignment operator in C++03. It also fixes a bug where std::forward was given the wrong type.
The following two tests begin passing in C++03:

* `unique_ptr.single.asgn/move_convert.pass.cpp`
* `unique_ptr.single.asgn/move_convert13.fail.cpp`

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12173

llvm-svn: 246272
2015-08-28 05:07:06 +00:00
Eric Fiselier 8465ea4440 [libcxx] Optimize away unneeded length calculation in basic_string::compare(const char*)
Summary:
This patch optimizes basic_string::compare to use strcmp when the default char_traits has been given.
See PR19900 for more information. https://llvm.org/bugs/show_bug.cgi?id=19900

Reviewers: mclow.lists

Subscribers: bkramer, cfe-commits

Differential Revision: http://reviews.llvm.org/D12355

llvm-svn: 246266
2015-08-28 03:02:37 +00:00
Jonathan Roelofs 643e0ab8df Do not include pthread.h and sched.h when threads are disabled
Patch by Philippe Daouadi!

http://reviews.llvm.org/D9639

llvm-svn: 246168
2015-08-27 17:47:34 +00:00
Marshall Clow 3e61f238c6 Remove a switch statement, and replace with a bunch of ifs to silence a warning about 'all the enumeration values covered'. No functional change.
llvm-svn: 246150
2015-08-27 14:37:22 +00:00
Eric Fiselier 70192a9efb [libcxx] Rewrite C++03 __invoke.
Summary:
This patch rewrites the C++03 `__invoke` and related meta-programming. There are a number of major changes.

`__invoke` in C++03 now has a fallback overload for when the invoke expression is ill-formed (similar to C++11). This means that the `__invoke_return` traits will return `__nat` when `__invoke(...)` is ill formed. This would previously cause a compile error.

Bullets 1-4 of `__invoke` have been rewritten. In the old version `__invoke` had 32 overloads for bullets 1 and 2,
one for each possible cv-qualified function signature with arities 0-3. 64 overloads would be needed to support member functions
with varargs. Currently these overloads were fundamentally broken. An example overload looked like:
```
template <class Rp, class Tp, class T1, class A0>
Rp __invoke(Rp (Tp::*pm)(A0) const, T1&, A0&)
```
Because `A0` appeared in two different deducible contexts it would have to deduce to be an exact match or the overload
would be rejected. This is made even worse because `A0` appears without a reference qualifier in the member function signature
and with a reference qualifier as an `__invoke` parameter. This means that only member functions that took all
of their arguments by value could be matched.

One possible fix would be to make the second occurrence of `A0` appear in a non-deducible context. This way
any type convertible to `A0` could be passed as the first parameter. The benefit of this approach is that the
signature of the member function enforces the arity and types taken by the `__invoke` signature it generates. However
nothing in the `INVOKE` specification requires this behavior.

My solution is to use a `__invoke_enable_if<PM_Type, Tp>`  metafunction to selectively enable the `__invoke` overloads for bullets 1, 2, 3 and 4.  It uses `__member_function_traits` to inspect and extract the return type and class type of the pointer to member. Using `__member_function_traits` to inspect `PM_Type` also allows us to reduce the number of `__invoke` overloads from 32 to 8 and add
varargs support at the same time.

Because `__invoke_enable_if` knows the exact return type of `__invoke` for bullets 1-4 we no longer need to use `decltype(__invoke(...))` to
compute the return type in the `__invoke_return*` traits. This will reduce the problems caused by `#define decltype(X) __typeof__(X)` in C++03.

Tests for this change have already been committed. All tests in `test/std/utilities/function.objects` now pass in C++03, previously there were 20 failures.

Reviewers: K-ballo, howard.hinnant, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11553

llvm-svn: 246068
2015-08-26 20:15:02 +00:00
Marshall Clow 550dfe79ca Fix a crasher found by libFuzzer
llvm-svn: 245849
2015-08-24 15:57:09 +00:00
Eric Fiselier 1c81340797 Recommit rL245802: Cleanup fancy pointer rebinding in list using __rebind_pointer.
Currently we need an #ifdef branch every time we use pointer traits to rebind a pointer because
it is done differently in C++11 and C++03. This patch introduces the __rebind_pointer utility to
clean this up.

Also add a test that list and it's iterators can be instantiated with incomplete element types.

llvm-svn: 245806
2015-08-23 02:56:05 +00:00
Eric Fiselier 236f405b1d Revert r245802. It violates the incomplete type requirements.
llvm-svn: 245805
2015-08-23 02:39:20 +00:00
Eric Fiselier 24e817d223 Cleanup fancy pointer rebinding in list using __rebind_pointer.
Currently we need an #ifdef branch every time we use pointer traits to rebind a pointer because
it is done differently in C++11 and C++03. This patch introduces the __rebind_pointer utility to
clean this up. 

llvm-svn: 245802
2015-08-23 02:34:18 +00:00
Eric Fiselier 7cb813ffc4 [libcxx] Add "install-libcxx" target.
Summary: Currently you can't install libc++ from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++.

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11697

llvm-svn: 245470
2015-08-19 17:41:53 +00:00
Eric Fiselier 749adeba3d [libcxx] Allow use of <atomic> in C++03. Try 3.
Summary:
After putting this question up on cfe-dev I have decided that it would be best to allow the use of `<atomic>` in C++03. Although static initialization is a concern the syntax required to get it is C++11 only. Meaning that C++11 constant static initialization cannot silently break in C++03, it will always cause a syntax error. Furthermore `ATOMIC_VAR_INIT` and `ATOMIC_FLAG_INIT` remain defined in C++03 even though they cannot be used because C++03 usages will cause better error messages.

The main change in this patch is to replace `__has_feature(cxx_atomic)`, which only returns true when C++ >= 11, to `__has_extension(c_atomic)` which returns true whenever clang supports the required atomic builtins.


This patch adds the following macros:
* `_LIBCPP_HAS_C_ATOMIC_IMP`      - Defined on clang versions which provide the C `_Atomic` keyword.
* `_LIBCPP_HAS_GCC_ATOMIC_IMP` - Defined on GCC > 4.7. We must use the fallback atomic implementation.
* `_LIBCPP_HAS_NO_ATOMIC_HEADER` - Defined when it is not safe to include `<atomic>`.

`_LIBCPP_HAS_C_ATOMIC_IMP` and `_LIBCPP_HAS_GCC_ATOMIC_IMP` are mutually exclusive, only one should be defined. If neither is defined then `<atomic>` is not implemented and including `<atomic>` will issue an error.

Reviewers: chandlerc, jroelofs, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11555

llvm-svn: 245463
2015-08-19 17:21:46 +00:00
Dimitry Andric 251c629117 Fix warnings about pessimizing return moves for C++11 and higher
Summary:
Throughout the libc++ headers, there are a few instances where
_VSTD::move() is used to return a local variable.  Howard commented in
r189039 that these were there "for non-obvious reasons such as to help
things limp along in C++03 language mode".

However, when compiling these headers with warnings on, and in C++11 or
higher mode (like we do in FreeBSD), they cause the following complaints
about pessimizing moves:

    In file included from tests.cpp:26:
    In file included from tests.hpp:29:
    /usr/include/c++/v1/map:1368:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
        return _VSTD::move(__h);  // explicitly moved for C++03
               ^
    /usr/include/c++/v1/__config:368:15: note: expanded from macro '_VSTD'
    #define _VSTD std::_LIBCPP_NAMESPACE
                  ^

Attempt to fix this by adding a _LIBCPP_EXPLICIT_MOVE() macro to
__config, which gets defined to _VSTD::move for pre-C++11, and to
nothing for C++11 and later.

I am not completely satisfied with the macro name (I also considered
_LIBCPP_COMPAT_MOVE and some other variants), so suggestions are
welcome. :)

Reviewers: mclow.lists, howard.hinnant, EricWF

Subscribers: arthur.j.odwyer, cfe-commits

Differential Revision: http://reviews.llvm.org/D11394

llvm-svn: 245421
2015-08-19 06:43:33 +00:00
Eric Fiselier 21851d2b45 Remove commented out TODOs. They defined unneeded methods.
llvm-svn: 245411
2015-08-19 03:48:08 +00:00
Eric Fiselier 9a5e62bf75 Fix use of static_assert macro with nested commas
llvm-svn: 245410
2015-08-19 03:38:41 +00:00
Marshall Clow 29f11b381f Broke C++03 compatibility in 245330. Fix that.
llvm-svn: 245336
2015-08-18 19:51:37 +00:00
Eric Fiselier 0d28f78401 [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function.
Summary:
This patch fixes __not_null's detection of nullptr by breaking it down into 4 cases.

1. `__not_null(Tp const&)`: Default case. Tp is not null.
2. `__not_null(Tp* __ptr);` Case for pointers to functions.
3. `__not_null(_Ret _Class::* __ptr);` Case for pointers to members.
4. `__not_null(function<Tp> const&);`: Cases for other std::functions.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11111

llvm-svn: 245335
2015-08-18 19:41:51 +00:00
Eric Fiselier 4504cf2c8d [libc++] Fix PR22606 - Leak pthread_key with static storage duration to ensure all of thread-local destructors are called.
Summary:
See https://llvm.org/bugs/show_bug.cgi?id=22606 for more discussion.

Most of the changes in this patch are file reorganization to help ensure assumptions about how __thread_specific_pointer is used hold. The assumptions are:

* `__thread_specific_ptr<Tp>` is only created with a `__thread_struct` pointer.
* `__thread_specific_ptr<Tp>` can only be constructed inside the `__thread_local_data()` function.

I'll remove the comments before committing. They are there for clarity during review.

Reviewers: earthdok, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8802

llvm-svn: 245334
2015-08-18 19:40:38 +00:00
Eric Fiselier 556f9340f7 [libcxx] Disable -Wnon-virtual-dtor warning in <locale>
Summary:
Normally people won't see warnings in libc++ headers, but if they compile with "-Wsystem-headers -Wnon-virtual-dtor" they will likely see issues in <locale>.

In the libc++ implementation `time_get' has a private base class, `__time_get_c_storage`, with virtual methods but a non-virtual destructor. 
`time_get` itself can safely be used as a polymorphic base class because it inherits a virtual destructor from `locale::facet`. To placate the compiler we change `__time_get_c_storage`'s destructor from public to protected, ensuring that it will never be deleted polymorphically.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11670

llvm-svn: 245333
2015-08-18 19:39:35 +00:00
Marshall Clow 1378a5aec3 implement more of N4258 - Cleaning up noexcept in the standard library. Specifically add new noexcept stuff to vector and string's move-assignment operations
llvm-svn: 245330
2015-08-18 18:57:00 +00:00
Marshall Clow 05ddbffbf3 Make regex and any assert when they should throw an exception _but_ the user has decreed 'no exceptions'. This matches the behavior of string and vector
llvm-svn: 245239
2015-08-17 21:14:16 +00:00
Joerg Sonnenberger 08142fa6c7 Protect template argument from user interference.
llvm-svn: 244462
2015-08-10 16:58:04 +00:00
Marshall Clow 2d265aee08 Change char_traits<char16_t>::eof() to return 0xFFFF instead of 0xDFFF. Fixes PR#24342
llvm-svn: 243937
2015-08-04 01:38:34 +00:00
Eric Fiselier 5265a3ed71 Mark any as done and comment out extra methods until speaking to Marshall
llvm-svn: 243729
2015-07-31 02:29:11 +00:00
Eric Fiselier 3461dbc0a7 [libcxx] Add <experimental/any> v2.
Summary:
This patch adds the second revision of <experimental/any>. 
I've been working from the LFTS draft found at this link. https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#any



Reviewers: danalbert, jroelofs, K-ballo, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6762

llvm-svn: 243728
2015-07-31 02:24:58 +00:00
Marshall Clow a6438ca12a Fix PR#24267. use numeric_limits::max instead of ~0 for 'all ones', since that might give wrong answers on a 1's complement machine.
llvm-svn: 243674
2015-07-30 18:26:34 +00:00
Nick Lewycky dd2eb13ac4 Fix typo in unused variable name.
llvm-svn: 243586
2015-07-29 22:38:23 +00:00
Marshall Clow adfdae18c8 Fix a self-move bug in inplace_merge. Thanks to Ted and Dexon for the report and the suggested fix.
llvm-svn: 243530
2015-07-29 16:25:45 +00:00
Marshall Clow bcbc37d8a1 Consolidate a bunch of #ifdef _LIBCPP_NO_EXCEPTIONS .. #endif blocks into a single template function. NFC
llvm-svn: 243415
2015-07-28 13:30:47 +00:00
Eric Fiselier e62bda70aa Cleanup C++03 __invoke for Bullets 3 and 4.
The key changes in this patch are:

1. Remove the zero-argument overload in mem_fn. A member function must always
   be invoked with at least one argument, the class instance. The zero-argument
   operator()() in mem_fn would cause mem_fn to fail to compile when because
   the call to '__invoke(pm)' is not well formed.

2. Prevent evaluation of '__apply_cv<Tp, Ret>' when 'Ret' is a function type.
   'Ret' is a function type whenever 'Ret Tp::*' is a pointer to member function.
   Attempting to add cv and ref qualifiers to a function type can cause a hard
   compile error.

3. Remove the dummy overload __invoke(Rp Tp::*). It was present to help work
   around #1. It will be replaced with a different '__invoke' overload that
   represents a bad call to invoke.

After applying this patch the test func.wrap.func.inv/invoke.pass.cpp now
passes.

llvm-svn: 243370
2015-07-28 02:15:53 +00:00
Eric Fiselier fda20d94e7 Get C++03 __invoke working for bullet 5 of INVOKE.
This patch does a couple of things to get __invoke working for free-functions
and call objects.

1. Turn all uses of declval<Tp>() into declval<Tp&>(). The C++03 __invoke only
   supports lvalues but it will be used when the compiler supports rvalue
   references but not variadic templates. This change makes sure we don't
   generate an rvalue.

2. Call objects for bullet 5 are now passed by reference and not value. Copying
   the functor is incorrect. It will fail to compile for non-copyable functors
   and it will discard cv-qualifiers on the call object, possibly leading to the
   wrong function being called. I suspect that the reason the call object
   was originally taken by value was to support temporary call objects.
   However __invoke is only used internally and it is never given a temporary.

llvm-svn: 243368
2015-07-28 01:52:08 +00:00
Marshall Clow 983d178108 Detect and throw on a class of bad regexes that we mistakenly accepted before. Thanks to Trevor Smigiel for the report
llvm-svn: 243030
2015-07-23 18:27:51 +00:00
Eric Fiselier 00f512ebdf Merge C++03 and C++11 implementations of mem_fn and __mem_fn.
The implementation of mem_fn doesn't actually require any  C++11 support.
For some reason there were 17 overloads for mem_fn in C++03 when only one
is needed. This patch removes the extra overloads and uses the same implementation
of mem_fn in C++03 and C++11.

__mem_fn does require variadics to implement the call operator. Instead of
having two entirely different implementations of the __mem_fn struct, this patch
uses the same __mem_fn struct but provides different call operators when
variadics are not available.

The only thing left in <__functional_03> is the C++03 implementation of
std::function.

llvm-svn: 242959
2015-07-22 22:43:27 +00:00
Eric Fiselier 48cf128785 Remove almost everything in <__functional_base_03>
This patch removes a large amount of duplicate code found in both
<__functional_base> and <__functional_base_03>. The only code that remains
in <__functional_base_03> is the C++03 implementation of __invoke and
__invoke_return.

llvm-svn: 242951
2015-07-22 22:23:49 +00:00
Eric Fiselier e345173146 Remove more commented out code. That is what version control is for.
llvm-svn: 242872
2015-07-22 04:37:12 +00:00
Eric Fiselier e5407178d6 Cleanup <__functional_03>
<__functional_03> provides the C++03 definitions for std::memfun and
std::function. However the interaction between <functional> and <__functional_03>
is ugly and duplicates code needlessly. This patch cleans up how the two
headers work together.

The major changes are:

- Provide placeholders, is_bind_expression and is_placeholder in <functional>
  for both C++03 and C++11.

- Provide bad_function_call, function fwd decl,
  __maybe_derive_from_unary_function and __maybe_derive_from_binary_function
  in <functional> for both C++03 and C++11.

- Move the <__functional_03> include to the bottom of <functional>. This makes
  it easier to see how <__functional_03> interacts with <functional>

- Remove a commented out implementation of bind in C++03. It's never going
  to get implemented.

- Mark almost all std::bind tests as unsupported in C++03. std::is_placeholder
  works in C++03 and C++11. std::is_bind_expression is provided in C++03 but
  always returns false.

llvm-svn: 242870
2015-07-22 04:14:38 +00:00
Eric Fiselier b50f8f9ee7 Fix initializer list order in <regex> to be correct
llvm-svn: 242864
2015-07-22 01:29:41 +00:00
Marshall Clow 205c333c99 Implement the default searcher for std::experimental::search.
llvm-svn: 242682
2015-07-20 16:39:28 +00:00
Marshall Clow 81416e492e Implement the plugin-based version of std::search. There are no searchers yet; those are coming soon.
llvm-svn: 242679
2015-07-20 15:40:27 +00:00
Eric Fiselier c45b673d5d Fix warnings in deque tests
llvm-svn: 242632
2015-07-19 00:31:54 +00:00
Eric Fiselier 2decfad7c5 Fix warnings in array and assoc containers
llvm-svn: 242629
2015-07-18 23:56:04 +00:00
Eric Fiselier 818139da59 Remove unused typedefs in random and regex
llvm-svn: 242628
2015-07-18 22:57:14 +00:00
Eric Fiselier 87a82490fc Enable and fix warnings during the build.
Although CMake adds warning flags, they are ignored in the libc++ headers
because the headers '#pragma system header' themselves.

This patch disables the system header pragma when building libc++ and fixes
the warnings that arose.

The warnings fixed were:
1. <memory> - anonymous structs are a GNU extension
2. <functional> - anonymous structs are a GNU extension.
3. <__hash_table> - Embedded preprocessor directives have undefined behavior.
4. <string> - Definition is missing noexcept from declaration.
5. <__std_stream> - Unused variable.

llvm-svn: 242623
2015-07-18 20:40:46 +00:00
Eric Fiselier 980eda3fc2 Add missing instrumentation in vector::insert - Patch from Anna Zaks
This patch was reviewed as D10859. http://reviews.llvm.org/D10859

llvm-svn: 242617
2015-07-18 18:22:12 +00:00
Eric Fiselier 083abfb3f6 [libcxx] Get is_*_destructible tests passing in C++03.
Summary: This patch adds proper guards to the is_destructible tests depending on the standard version so that they pass in c++03.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D10047

llvm-svn: 242612
2015-07-18 16:43:58 +00:00
Marshall Clow 34389c8d78 Bump libc++ version # to 3.8
llvm-svn: 242541
2015-07-17 16:36:44 +00:00
Marshall Clow f6a14fb4e2 Set the libc++ version # to 3.7. Will bump to 3.8 soon
llvm-svn: 242421
2015-07-16 17:22:24 +00:00
Marshall Clow 05fc0f25d6 Make sure that __libcpp_compressed_pair_imp default-constructs its' members, rather than value-initializing them. Fixes PR#24137
llvm-svn: 242377
2015-07-16 03:05:06 +00:00
Eric Fiselier 5be45129a4 Implement n4169 - Add invoke function template
llvm-svn: 242195
2015-07-14 20:16:15 +00:00
Eric Fiselier 092c475e25 Fix PR24114 - std::atomic for non-Clang is not a literal type
Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t.

llvm-svn: 242172
2015-07-14 17:50:27 +00:00
Marshall Clow 71ff7c3f0f Move bits from N4258. Mark vector's move-constructor unconditionally noexcept in C++1z
llvm-svn: 242148
2015-07-14 14:46:32 +00:00
Marshall Clow e3fbe1433b Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
llvm-svn: 242056
2015-07-13 20:04:56 +00:00
Eric Fiselier 2d15f15f28 [libcxx] LWG2420 bits for bind<void> - Patch from K-Ballo
Implemented LWG2420 bits for bind<void>

Review: http://reviews.llvm.org/D10997
llvm-svn: 241967
2015-07-10 23:29:18 +00:00
Eric Fiselier e825d8b736 Use __is_identifier to detect __decltype and not the clang version.
llvm-svn: 241939
2015-07-10 20:26:38 +00:00
Marshall Clow bc4c89a977 The rest of N4279 and LWG#2464 - for unordered_map
llvm-svn: 241555
2015-07-07 05:45:35 +00:00
Marshall Clow 8aaf517db7 Implement N4279 and LWG#2664 for <map>. Reviewed as http://reviews.llvm.org/D10669
llvm-svn: 241539
2015-07-07 03:37:33 +00:00
Eric Fiselier 1faf289e27 [libcxx] Add atomic_support.h header to src that handles needed atomic operations.
Summary:
In some places in libc++ we need to use the `__atomic_*` builtins. This patch adds a header that provides access to those builtins in a uniform way from within the dylib source.

If the compiler building the dylib does not support these builtins then a warning is issued.

Only relaxed loads are needed within the headers. A singe function to do these relaxed loads has been added to `<memory>`.

This patch applies the new atomic builtins to `__shared_count` and `call_once`.

Reviewers: mclow.lists

Subscribers: majnemer, jroelofs, cfe-commits

Differential Revision: http://reviews.llvm.org/D10406

llvm-svn: 241532
2015-07-07 00:27:16 +00:00
Ed Schouten 2a7ab629e5 Cleanup: prefer _LIBCPP_GET_C_LOCALE over __cloc().
The __cloc() function is only present in case the environment does not
provide a way to refer to the C locale using a compile-time constant
expression. _LIBCPP_GET_C_LOCALE seems to be defined unconditionally.

This improves compilation of the locale code on CloudABI.

Differential Revision:	http://reviews.llvm.org/D10690
Reviewed by:	jroelofs

llvm-svn: 241454
2015-07-06 15:37:40 +00:00
Marshall Clow f43a42d53e Noticed that std::allocator<const T> was missing the definition for is_always_equal. Fixed this, and added a test for it.
llvm-svn: 241190
2015-07-01 21:23:40 +00:00
Marshall Clow e3ab564e4d K-ballo pointed out that I missed one of the specializations of packaged_task when I committed r241068. Thanks for the catch.
llvm-svn: 241095
2015-06-30 18:28:35 +00:00
Marshall Clow f8457a0735 Add tests for LWG#2299. While doing so, I noticed that the tests we have for the transparent comparators don't actually call them. Fix those tests, too. Now one of them is failing, due to a missing const in <map>. Add that (twice). Next step is to do the same for <unordered_map>
llvm-svn: 241091
2015-06-30 18:15:41 +00:00
Marshall Clow 660dcd9168 Implement LWG#2407: 'packaged_task(allocator_arg_t, const Allocator&, F&&) should neither be constrained nor explicit'
llvm-svn: 241068
2015-06-30 14:16:49 +00:00
Marshall Clow f69ae47128 Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480
llvm-svn: 241067
2015-06-30 14:04:14 +00:00
Ed Schouten e0cf3b9a3c Make support for thread-unsafe C functions optional.
One of the aspects of CloudABI is that it aims to help you write code
that is thread-safe out of the box. This is very important if you want
to write libraries that are easy to reuse. For CloudABI we decided to
not provide the thread-unsafe functions. So far this is working out
pretty well, as thread-unsafety issues are detected really early on.

The following patch adds a knob to libc++,
_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable
thread-unsafe functions that can easily be avoided in practice. The
following functions are not thread-safe:

- <clocale>: locale handles should be preferred over setlocale().
- <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over
  their non-restartable counterparts.
- <ctime>: asctime(), ctime(), gmtime() and localtime() are not
  thread-safe. The first two are also deprecated by POSIX.

Differential Revision:	http://reviews.llvm.org/D8703
Reviewed by:	marshall

llvm-svn: 240527
2015-06-24 08:44:38 +00:00
Marshall Clow 99f5fc937f Make seeking on an ostream that has eofbit set work correctly. Fixes PR#21361
llvm-svn: 240286
2015-06-22 15:01:21 +00:00
Marshall Clow 5b0f04a589 Fix illegal chars that snuck into <memory>
llvm-svn: 240163
2015-06-19 19:32:06 +00:00
Marshall Clow 79336aa3a4 Fix ASAN bot; missing bookkeeping in r240136.
llvm-svn: 240139
2015-06-19 17:13:59 +00:00
Marshall Clow 55112defb0 Fix PR#18843. Thanks to Howard for the fix
llvm-svn: 240136
2015-06-19 15:54:13 +00:00
Jonathan Roelofs 6dec6d896f Delete dead code. NFCI
llvm-svn: 239974
2015-06-17 23:31:45 +00:00
Eric Fiselier b11df184ad Fix std::function allocator constructors in C++03.
The C++03 version of function tried to default construct the allocator
in the uses allocator constructors when no allocation was performed. These
constructors would fail to compile when used with allocators that had no
default constructor.

llvm-svn: 239708
2015-06-14 23:30:09 +00:00
Eric Fiselier d9ad0cbd70 Cleanup result_of tests and fix issues with the C++03 result_of.
The two main fixes this patch contains are:
- use __identity_t instead of common_type. common_type was used as an
  identity metafunction but the decay resulted in incorrect results.
- Pointers to free functions were not counted as functions. Remove the pointer
  before checking if a type is a function.

llvm-svn: 239668
2015-06-13 08:25:24 +00:00
Eric Fiselier de3f2b396c Fix PR12999 - unordered_set::insert calls operator new when no insert occurs
Summary:
when `unordered_set::insert(value_type&&)` was called it would be treated like `unordered_set::emplace(Args&&)` and it would allocate and construct a node before trying to insert it.
This caused unnecessary allocations when the value was already in the set. This patch adds an overload to `__hash_table::__insert_unique` that specifically handles `value_type&&` more link `value_type const &`. 

This patch also adds a single unified insert function for values into  `__hash_table` called `__insert_unique_value` that handles the cases for `__insert_unique(value_type&&)` and `__insert_unique(value_type const &)`. 

This patch fixes PR12999: http://llvm.org/bugs/show_bug.cgi?id=12999.




Reviewers: mclow.lists, titus, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D7570

llvm-svn: 239666
2015-06-13 07:18:32 +00:00
Eric Fiselier ee187e247b [libcxx] Fix detection of __is_final.
Summary: Currently we only enable the use of __is_final(...) with Clang. GCC also provides __is_final(...) since 4.7 in all standard modes. This patch creates the macro _LIBCPP_HAS_IS_FINAL to note the availability of `__is_final`.

Reviewers: danalbert, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8795

llvm-svn: 239664
2015-06-13 07:08:02 +00:00