Skip to content

Commit

Permalink
Enable printers and xmethods for std::__cxx11::list
Browse files Browse the repository at this point in the history
	* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
	Register printer for std::__cxx11::list.
	* python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
	std::__cxx11::list as well as std::list.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240982 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
redi committed Oct 11, 2016
1 parent 18f4161 commit 0a9343a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions libstdc++-v3/ChangeLog
@@ -1,5 +1,10 @@
2016-10-11 Jonathan Wakely <jwakely@redhat.com>

* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
Register printer for std::__cxx11::list.
* python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
std::__cxx11::list as well as std::list.

* include/experimental/string_view (basic_string_view::_S_compare):
Remove redundant const from return type.
* include/std/string_view (basic_string_view:_S_compare): Likewise.
Expand Down
1 change: 1 addition & 0 deletions libstdc++-v3/python/libstdcxx/v6/printers.py
Expand Up @@ -1445,6 +1445,7 @@ def build_libstdcxx_dictionary ():
libstdcxx_printer.add_container('std::', 'bitset', StdBitsetPrinter)
libstdcxx_printer.add_container('std::', 'deque', StdDequePrinter)
libstdcxx_printer.add_container('std::', 'list', StdListPrinter)
libstdcxx_printer.add_container('std::__cxx11::', 'list', StdListPrinter)
libstdcxx_printer.add_container('std::', 'map', StdMapPrinter)
libstdcxx_printer.add_container('std::', 'multimap', StdMapPrinter)
libstdcxx_printer.add_container('std::', 'multiset', StdSetPrinter)
Expand Down
2 changes: 1 addition & 1 deletion libstdc++-v3/python/libstdcxx/v6/xmethods.py
Expand Up @@ -390,7 +390,7 @@ def __init__(self):
self.methods = [self._method_dict[m] for m in self._method_dict]

def match(self, class_type, method_name):
if not re.match('^std::list<.*>$', class_type.tag):
if not re.match('^std::(__cxx11::)?list<.*>$', class_type.tag):
return None
method = self._method_dict.get(method_name)
if method is None or not method.enabled:
Expand Down
3 changes: 0 additions & 3 deletions libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
Expand Up @@ -18,9 +18,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.

// List xmethods only recognize the non cxx11 std::list for now.
#define _GLIBCXX_USE_CXX11_ABI 0

#include <list>

int
Expand Down

0 comments on commit 0a9343a

Please sign in to comment.