[Lldb-commits] [PATCH] D104283: [lldb] Fix libstdc++ 11's std::unique_ptr affecting LLDB testsuite TestDataFormatterStdUniquePtr.py

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 15 00:44:01 PDT 2021


teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.

I think the way the provider is supposed to work is that there is always `deleter` child as long as it's not `default_delete<T>`, so I think we have to check for the name to avoid that we also hide an empty user-specified deleter.

  ValueObjectSP del_obj = tuple_frontend->GetChildAtIndex(1);
  if (del_obj) {
    ConstString del_name = del_obj->GetDisplayTypeName();
    if (!del_name.GetStringRef().startswith("std::default_delete<"))
      m_del_obj = del_obj->Clone(ConstString("deleter")).get();
  }

(Technically that would hide the deleter if the user specifies a default-deleter that just happens to be compatible, but that seems like an obscure corner case so this seems "good enough").


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104283



More information about the lldb-commits mailing list