Page MenuHomePhabricator

[DebugInfo] Define base function on DWARFDie reverse iterators

Authored by eush on Oct 27 2018, 3:43 AM.



This defines member function base on the specialization of
std::reverse_iterator for DWARFDie::iterator as required by C++

This fixes unit test DWARFDebugInfoTest.cpp under EXPENSIVE_CHECKS
which currently can't be built due to GNU C++ Library calling this
member function in debug mode:

/usr/include/c++/8.2.1/debug/stl_iterator.h:42:35: error: ‘const class std::reverse_iterator<llvm::DWARFDie::iterator>’ has no member named ‘base’
     { return __valid_range(__last.base(), __first.base(), __dist); }

This fixes

Diff Detail


Event Timeline

eush created this revision.Oct 27 2018, 3:43 AM

Could you add a unit test for this function while you're adding it?

eush updated this revision to Diff 171419.Oct 28 2018, 3:35 AM

Added a test for the new function.

JDevlieghere accepted this revision.Oct 29 2018, 10:15 AM

Thanks for fixing this and sorry about the oversight. LGTM!

This revision is now accepted and ready to land.Oct 29 2018, 10:15 AM
eush added a comment.Oct 30 2018, 3:46 AM

Can you commit this change? I don't have commit access.

This revision was automatically updated to reflect the committed changes.