Skip to content
  1. Oct 07, 2013
    • Peter Collingbourne's avatar
      Silence the unused function warning in exception.cpp. · 8b9c5d1a
      Peter Collingbourne authored
      Rather than try to protect the function behind a precise,
      ever-changing #if expression, just inline it into every caller.
      
      llvm-svn: 192077
      8b9c5d1a
    • Peter Collingbourne's avatar
      Implement std::exception_ptr under libsupc++. · 3b5d9692
      Peter Collingbourne authored
      libsupc++ does not implement the dependent EH ABI and the
      functionality it uses to implement std::exception_ptr (which it
      declares as an alias of std::__exception_ptr::exception_ptr) is not
      directly exported to clients. So we have little choice but to hijack
      std::__exception_ptr::exception_ptr's (which fortunately has the
      same layout as our std::exception_ptr) copy constructor, assignment
      operator and destructor (which are part of its stable ABI), and its
      rethrow_exception(std::__exception_ptr::exception_ptr) function.
      
      Also, remove some out of date comments.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1826
      
      llvm-svn: 192076
      3b5d9692
    • Peter Collingbourne's avatar
      Make it possible to link against libstdc++ as well as libsupc++ with CMake. · 26dd09e5
      Peter Collingbourne authored
      Linking against libstdc++, rather than libsupc++, is probably better
      for people who need to link against clients of libstdc++.  Because
      libsupc++ is provided only as a static library, its globals are not
      shared between the static library and the copy linked into libstdc++.
      This has been found to cause at least one test failure.
      
      This also removes a number of symbols which were multiply defined
      between libstdc++ and libc++, only when linking with libstdc++.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1825
      
      llvm-svn: 192075
      26dd09e5
    • Peter Collingbourne's avatar
      Eliminate more symbols multiply defined between libsupc++ and libc++. · 926aa5f4
      Peter Collingbourne authored
      The remaining multiple definitions were flushed out by attempting to
      link libsupc++ and libc++ into the same executable with --whole-archive,
      e.g.
      
      clang++ -I../llvm/projects/libcxx/include -nodefaultlibs -Wl,--whole-archive lib/libc++.a /usr/lib/gcc/x86_64-linux-gnu/4.6/libsupc++.a -Wl,--no-whole-archive -lgcc -lgcc_s -lc -lpthread -lrt
      
      (The same technique was used to flush out multiple definitions in
      libstdc++.)
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1824
      
      llvm-svn: 192074
      926aa5f4
  2. Oct 06, 2013
  3. Oct 05, 2013
    • Howard Hinnant's avatar
      G M: The attached patch is for libcxx's new.cpp and __config files. The... · a942f2ff
      Howard Hinnant authored
      G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler.
      
      The issue this patch seeks to address is that MS's compiler (cl.exe) doesn't support the __attribute__((__weak__)) or __atribute__((__visibility__("default")) syntax; so a solution must be found where cl.exe doesn't see this syntax.
      
      This patch seeks to solve this problem by changing code patterned like this:
      __attribute__((__weak__, __visibility__("default")))
      void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { /*snip*/; return p; }
      
      to code like this:
      _LIBCPP_WEAK
      void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { return p; }
      
      Howard:  Thanks for all the comments regarding the default visibility
      tag on the definition.  I agree it isn't needed, and that there are lots
      of other places where it is missing.  That being said, I'm not wanting
      to rock the boat on that issue right now.  So I've added it back to the
      definition via _LIBCPP_FUNC_VIS.  A later pass dedicated just to this
      issue can bring things in to a consistent state one way or the other. 
      Note that we do not want to have the exact same attributes on the
      declaration and defintion in this case.  The declaration should not be
      marked weak, whereas the definition should (which is what G M's patch
      did). I've fully tested on OS X to ensure that the resultant attribute
      syntax actually works.
      
      llvm-svn: 192007
      a942f2ff
    • Howard Hinnant's avatar
      G M: A small patch to fix a couple of warnings in stdexcept.cpp for cl.exe... · 79710108
      Howard Hinnant authored
      G M: A small patch to fix a couple of warnings in stdexcept.cpp for cl.exe which does not support #pragma visibility.
      
      llvm-svn: 191988
      79710108
  4. Oct 04, 2013
  5. Sep 25, 2013
  6. Sep 21, 2013
  7. Sep 17, 2013
  8. Sep 14, 2013
  9. Sep 11, 2013
  10. Sep 04, 2013
  11. Sep 02, 2013
  12. Aug 30, 2013
  13. Aug 29, 2013
  14. Aug 26, 2013
  15. Aug 23, 2013
  16. Aug 22, 2013
  17. Aug 21, 2013
  18. Aug 14, 2013
  19. Aug 12, 2013
  20. Aug 02, 2013
    • Howard Hinnant's avatar
      Ok, 3 major changes for debug mode in one commit: · 42a3046e
      Howard Hinnant authored
      1.  I had been detecting and trapping iterator == and \!= among iterators
          in different containers as an error.  But the trapping itself is actually
          an error.
          
          Consider:
          
          #include <iostream>
          #include <vector>
          #include <algorithm>
      
          template <class C>
          void
          display(const C& c)
          {
              std::cout << "{";
              bool first = true;
              for (const auto& x : c)
              {
                  if (\!first)
                      std::cout << ", ";
                  first = false;
                  std::cout << x;
              }
              std::cout << "}\n";
          }
      
          int
          main()
          {
              typedef std::vector<int> V;
              V v1 = {1, 3, 5};
              V v2 = {2, 4, 6};
              display(v1);
              display(v2);
              V::iterator i = std::find(v1.begin(), v1.end(), 1);
              V::iterator j = std::find(v2.begin(), v2.end(), 2);
              if (*i == *j)
                  i = j;    // perfectly legal
              // ...
              if (i \!= j)   // the only way to check
                  v2.push_back(*i);
              display(v1);
              display(v2);
          }
      
          It is legal to assign an iterator from one container to another of the
          same type.  This is required to work.  One might want to test whether or
          not such an assignment had been made.  The way one performs such a check
          is using the iterator's ==, \!= operator.  This is a logical and necessary
          function and does not constitute an error.
      
      2.  I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
          This caused a problem in several of the libc++ tests.
          Fixed.
      
      3.  There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
          std::basic_string is inoperable.  std::basic_string uses __wrap_iterator
          to implement its iterators.  __wrap_iterator has been rigged up in debug
          mode to support vector.  But string hasn't been rigged up yet.  This means
          that one gets false positives when using std::string in debug mode.  I've
          upped std::string's priority in www/debug_mode.html.
      
      llvm-svn: 187636
      42a3046e
  21. Aug 01, 2013
    • Howard Hinnant's avatar
      Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is · 0be8f64c
      Howard Hinnant authored
      MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
      also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
      these macros should not be used interchangeably.
      
      This patch divides all Windows-related bits into the aforementioned
      categories. Two new macros are introduced:
      
      - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
        _MSC_VER, excluding Clang.
      - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
         when _WIN32 is defined.
      
      This leaves _WIN32 for code using the Windows API.
      
      This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.
      
      Nico, please prepare a patch for CREDITS.TXT, thanks.
      
      llvm-svn: 187593
      0be8f64c
  22. Jul 28, 2013
  23. Jul 23, 2013
  24. Jul 08, 2013
  25. Jul 02, 2013
  26. Jun 30, 2013
    • Howard Hinnant's avatar
      Matthew Dempsky: POSIX defines that the _POSIX_C_SOURCE macros are to be set by user · 8bd1771a
      Howard Hinnant authored
      code to specify what version of POSIX the system should provide.  If
      you want to check what version of POSIX is actually available, you're
      supposed to test _POSIX_VERSION.
      
      However, since sysconf() has been in POSIX since 1995, it's probably
      safe to assume it's available on any system with a C++11 compiler,
      especially if _SC_NPROCESSORS_ONLN is defined too.  So no point in a
      complicated preprocessor rule if just we unconditionally include
      <unistd.h> (on non-Windows systems).
      
      Also, I've added a #warning for to help porters detect when a suitable
      implementation isn't detected at compile-time.
      
      Howard:  Matthew, can you patch CREDITS.TXT?  Thanks.
      llvm-svn: 185275
      8bd1771a
    • Howard Hinnant's avatar
      Matthew Dempsky: Same as stdexcept.cpp in libc++abi: we've already computed... · 27841fd8
      Howard Hinnant authored
      Matthew Dempsky: Same as stdexcept.cpp in libc++abi: we've already computed 'len strlen(msg)', so we can use memcpy() instead of strcpy().
      
      llvm-svn: 185274
      27841fd8
  27. May 17, 2013
Loading