Skip to content
  1. Sep 04, 2016
  2. Aug 25, 2016
  3. Jul 24, 2016
  4. Jul 11, 2016
  5. Jun 27, 2016
  6. Jun 18, 2016
    • Eric Fiselier's avatar
      Enable building and using atomic shared_ptr for GCC. · df93bad1
      Eric Fiselier authored
      Summary:
      Currently the  implementation of [util.smartptr.shared.atomic] is provided only when using Clang, and not with GCC. This is a relic of not having a GCC implementation of <atomic>, even though <atomic> isn't actually used in the implementation. This patch enables support for atomic shared_ptr functions when using GCC.
      
      Note that this is not a header only change. Previously only Clang builds of libc++.so would provide the required symbols. There is no reason  for this restriction.
      After this change both Clang and GCC builds should be binary compatible with each other WRT these symbols.
      
      
      Reviewers: mclow.lists, rmaprath, EricWF
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D21407
      
      llvm-svn: 273076
      df93bad1
  7. Jun 02, 2016
  8. May 18, 2016
    • Marshall Clow's avatar
      Change the control flow in atomic_compare_exchange_strong to avoid a potential deadlock. · 3379baeb
      Marshall Clow authored
      When you assign a shared_ptr, the deleter gets called and assigned. In this routine, the assignment happens inside a critical section, which could (potentially) lead to a deadlock, if the deleter did something wonky. Now we swap the old value with an (empty) temporary shared_ptr, and then let the temporary delete the old value when it goes out of scope (after the lock has been released).  This should fix PR#27724. Thanks to Hans Boehm for the bug report and the suggested fix.
      
      llvm-svn: 269965
      3379baeb
  9. May 07, 2016
  10. Apr 22, 2016
  11. Mar 03, 2016
  12. Feb 25, 2016
  13. Jan 11, 2016
  14. Dec 09, 2015
    • Evgeniy Stepanov's avatar
      Add 3 more missing inline/visibility attributes. · 02b8e949
      Evgeniy Stepanov authored
      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
      02b8e949
  15. Nov 12, 2015
  16. Nov 07, 2015
  17. Oct 25, 2015
  18. Aug 28, 2015
  19. Aug 23, 2015
  20. Aug 19, 2015
    • Eric Fiselier's avatar
      [libcxx] Allow use of <atomic> in C++03. Try 3. · 749adeba
      Eric Fiselier authored
      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
      749adeba
  21. Aug 18, 2015
  22. Jul 18, 2015
    • Eric Fiselier's avatar
      Enable and fix warnings during the build. · 87a82490
      Eric Fiselier authored
      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
      87a82490
  23. Jul 16, 2015
  24. Jul 13, 2015
  25. Jul 07, 2015
    • Eric Fiselier's avatar
      [libcxx] Add atomic_support.h header to src that handles needed atomic operations. · 1faf289e
      Eric Fiselier authored
      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
      1faf289e
  26. Jul 01, 2015
  27. Jun 19, 2015
  28. Jun 13, 2015
    • Eric Fiselier's avatar
      [libcxx] Fix detection of __is_final. · ee187e24
      Eric Fiselier authored
      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
      ee187e24
  29. Jun 02, 2015
Loading