[PATCH] D49279: Allow SyntheticChildFrontEnd's to request that they always get an object, nor a reference or pointer

Jim Ingham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 19:16:26 PDT 2018


jingham created this revision.
Herald added subscribers: llvm-commits, christof.

Some of the cxx synthetic child providers (for vector, set, multiset and bitset) were implicitly assuming that the object they received to format was an object, not a pointer or reference to an object, even though the pattern they used matched pointers and references.

Since that seems a handy simplification for the child provider, I added a flag to the provider flags to request that they always get an object, and made the generic front end runner code do the dereference before handing the ValueObject off to the provider.

Also added tests to all the failing formatters to ensure that they work with pointers and references.


Repository:
  rL LLVM

https://reviews.llvm.org/D49279

Files:
  include/lldb/DataFormatters/TypeSynthetic.h
  include/lldb/lldb-enumerations.h
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp
  source/Core/ValueObjectSyntheticFilter.cpp
  source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49279.155311.patch
Type: text/x-patch
Size: 27173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180713/d0beb141/attachment.bin>


More information about the llvm-commits mailing list