[PATCH] D109499: [DebugInfo][NFC] Erase capacity in DWARFUnit::clearDIEs().

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 11:01:06 PDT 2021


avl added a comment.

The used implementation come from /usr/include/c++/9/bits/allocator.h :

    template<typename _Tp>
      struct __shrink_to_fit_aux<_Tp, true>
      {
        static bool
        _S_do_it(_Tp& __c) noexcept
        {
  #if __cpp_exceptions
  	try
  	  {
  	    _Tp(__make_move_if_noexcept_iterator(__c.begin()),
  		__make_move_if_noexcept_iterator(__c.end()),
  		__c.get_allocator()).swap(__c);
  	    return true;
  	  }
  	catch(...)
  	  { return false; }
  #else
  	return false;   <<< this path is taken which do nothing.
  #endif
        }
      };

which belongs to gcc 9.3.0 libstdc++ library.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109499/new/

https://reviews.llvm.org/D109499



More information about the llvm-commits mailing list