svn commit: r320539 - in vendor/libc++/dist: include test/std/language.support/support.dynamic/new.delete/new.delete.placement test/std/utilities/utility/pairs/pair.astuple test/std/utilities/varia...

Dimitry Andric dim at FreeBSD.org
Sat Jul 1 13:24:39 UTC 2017


Author: dim
Date: Sat Jul  1 13:24:37 2017
New Revision: 320539
URL: https://svnweb.freebsd.org/changeset/base/320539

Log:
  Vendor import of libc++ trunk r306956:
  https://llvm.org/svn/llvm-project/libcxx/trunk@306956

Added:
  vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp   (contents, props changed)
Deleted:
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp
Modified:
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/new
  vendor/libc++/dist/include/string
  vendor/libc++/dist/utils/libcxx/test/target_info.py
  vendor/libc++/dist/www/upcoming_meeting.html

Modified: vendor/libc++/dist/include/__config
==============================================================================
--- vendor/libc++/dist/include/__config	Sat Jul  1 13:24:21 2017	(r320538)
+++ vendor/libc++/dist/include/__config	Sat Jul  1 13:24:37 2017	(r320539)
@@ -1176,11 +1176,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_
 #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR                                 \
   __attribute__((availability(macosx,strict,introduced=10.9)))                 \
   __attribute__((availability(ios,strict,introduced=7.0)))
-#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION                                \
-  __attribute__((availability(macosx,strict,introduced=10.13)))                \
-  __attribute__((availability(ios,strict,introduced=11.0)))                    \
-  __attribute__((availability(tvos,strict,introduced=11.0)))                   \
-  __attribute__((availability(watchos,strict,introduced=4.0)))
 #else
 #define _LIBCPP_AVAILABILITY_SHARED_MUTEX
 #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
@@ -1192,7 +1187,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_
 #define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
 #define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
 #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
-#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION
 #endif
 
 // Define availability that depends on _LIBCPP_NO_EXCEPTIONS.

Modified: vendor/libc++/dist/include/new
==============================================================================
--- vendor/libc++/dist/include/new	Sat Jul  1 13:24:21 2017	(r320538)
+++ vendor/libc++/dist/include/new	Sat Jul  1 13:24:37 2017	(r320539)
@@ -193,20 +193,20 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZE
 #endif
 
 #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void  operator delete(void* __p, std::align_val_t) _NOEXCEPT;
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void  operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
 #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
 #endif
 
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void  operator delete[](void* __p, std::align_val_t) _NOEXCEPT;
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void  operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
 #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void  operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
+_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
 #endif
 #endif
 

Modified: vendor/libc++/dist/include/string
==============================================================================
--- vendor/libc++/dist/include/string	Sat Jul  1 13:24:21 2017	(r320538)
+++ vendor/libc++/dist/include/string	Sat Jul  1 13:24:37 2017	(r320539)
@@ -4004,6 +4004,10 @@ basic_string<_CharT, _Traits, _Allocator>::__subscript
 
 #endif  // _LIBCPP_DEBUG_LEVEL >= 2
 
+_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<char>)
+_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<wchar_t>)
+_LIBCPP_EXTERN_TEMPLATE(string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&))
+
 #if _LIBCPP_STD_VER > 11 
 // Literal suffixes for basic_string [basic.string.literals]
 inline namespace literals
@@ -4036,10 +4040,6 @@ inline namespace literals
   }
 }
 #endif
-
-_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<char>)
-_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<wchar_t>)
-_LIBCPP_EXTERN_TEMPLATE(string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&))
 
 _LIBCPP_END_NAMESPACE_STD
 

Added: vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp	Sat Jul  1 13:24:37 2017	(r320539)
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <utility>
+
+// template <class T1, class T2> struct pair
+
+// tuple_element<I, pair<T1, T2> >::type
+
+#include <utility>
+
+int main()
+{
+    typedef std::pair<int, short> T;
+    typename std::tuple_element<2, T>::type foo; // expected-error at utility:* {{Index out of bounds in std::tuple_element<std::pair<T1, T2>>}}
+}

Added: vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp	Sat Jul  1 13:24:37 2017	(r320539)
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+// <variant>
+
+// template <size_t I, class T> struct variant_alternative; // undefined
+// template <size_t I, class T> struct variant_alternative<I, const T>;
+// template <size_t I, class T> struct variant_alternative<I, volatile T>;
+// template <size_t I, class T> struct variant_alternative<I, const volatile T>;
+// template <size_t I, class T>
+//   using variant_alternative_t = typename variant_alternative<I, T>::type;
+//
+// template <size_t I, class... Types>
+//    struct variant_alternative<I, variant<Types...>>;
+
+#include <memory>
+#include <type_traits>
+#include <variant>
+
+int main() {
+    using V = std::variant<int, void *, const void *, long double>;
+    typename std::variant_alternative<4, V>::type foo;  // expected-error at variant:* {{Index out of bounds in std::variant_alternative<>}}
+}

Modified: vendor/libc++/dist/utils/libcxx/test/target_info.py
==============================================================================
--- vendor/libc++/dist/utils/libcxx/test/target_info.py	Sat Jul  1 13:24:21 2017	(r320538)
+++ vendor/libc++/dist/utils/libcxx/test/target_info.py	Sat Jul  1 13:24:37 2017	(r320539)
@@ -8,11 +8,11 @@
 #===----------------------------------------------------------------------===//
 
 import importlib
-import lit.util  # pylint: disable=import-error,no-name-in-module
 import locale
 import os
 import platform
 import re
+import subprocess
 import sys
 
 class DefaultTargetInfo(object):
@@ -73,12 +73,13 @@ class DarwinLocalTI(DefaultTargetInfo):
         super(DarwinLocalTI, self).__init__(full_config)
 
     def is_host_macosx(self):
-        name = lit.util.capture(['sw_vers', '-productName']).strip()
+        name = subprocess.check_output(['sw_vers', '-productName']).strip()
         return name == "Mac OS X"
 
     def get_macosx_version(self):
         assert self.is_host_macosx()
-        version = lit.util.capture(['sw_vers', '-productVersion']).strip()
+        version = subprocess.check_output(
+            ['sw_vers', '-productVersion']).strip()
         version = re.sub(r'([0-9]+\.[0-9]+)(\..*)?', r'\1', version)
         return version
 
@@ -86,7 +87,7 @@ class DarwinLocalTI(DefaultTargetInfo):
         assert self.is_host_macosx()
         cmd = ['xcrun', '--sdk', name, '--show-sdk-path']
         try:
-            out = lit.util.capture(cmd).strip()
+            out = subprocess.check_output(cmd).strip()
         except OSError:
             pass
 
@@ -127,7 +128,7 @@ class DarwinLocalTI(DefaultTargetInfo):
         else:
             cmd = ['xcrun', '--show-sdk-path']
         try:
-            out = lit.util.capture(cmd).strip()
+            out = subprocess.check_output(cmd).strip()
             res = 0
         except OSError:
             res = -1

Modified: vendor/libc++/dist/www/upcoming_meeting.html
==============================================================================
--- vendor/libc++/dist/www/upcoming_meeting.html	Sat Jul  1 13:24:21 2017	(r320538)
+++ vendor/libc++/dist/www/upcoming_meeting.html	Sat Jul  1 13:24:37 2017	(r320539)
@@ -90,10 +90,10 @@
 <li>2954 - I don't think there's anything to do here.</li>
 <li>2961 - We haven't implemented the PMR stuff yet.</li>
 <li>2966 - Wording cleanup; no code or test changes needed.</li>
-<li>2974 - I have some code lying around that does this.</li>
+<li>2974 - I did this in r305196. Tests added in 306580</li>
 </ul>
 
-<p>Last Updated: 25-Jun-2017</p>
+<p>Last Updated: 28-Jun-2017</p>
 </div>
 </body>
 </html>


More information about the svn-src-all mailing list