[all-commits] [llvm/llvm-project] 90b992: [lldb] Split ValueObject::CreateChildAtIndex into ...

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Jun 6 23:39:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90b9922df2d8fb65a33eb9abd002fa9262863b5b
      https://github.com/llvm/llvm-project/commit/90b9922df2d8fb65a33eb9abd002fa9262863b5b
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2024-06-07 (Fri, 07 Jun 2024)

  Changed paths:
    M lldb/include/lldb/Core/ValueObject.h
    M lldb/include/lldb/Core/ValueObjectConstResult.h
    M lldb/include/lldb/Core/ValueObjectConstResultCast.h
    M lldb/include/lldb/Core/ValueObjectConstResultChild.h
    M lldb/include/lldb/Core/ValueObjectConstResultImpl.h
    M lldb/include/lldb/Core/ValueObjectRegister.h
    M lldb/include/lldb/Core/ValueObjectVTable.h
    M lldb/source/Core/ValueObject.cpp
    M lldb/source/Core/ValueObjectConstResult.cpp
    M lldb/source/Core/ValueObjectConstResultCast.cpp
    M lldb/source/Core/ValueObjectConstResultChild.cpp
    M lldb/source/Core/ValueObjectConstResultImpl.cpp
    M lldb/source/Core/ValueObjectRegister.cpp
    M lldb/source/Core/ValueObjectVTable.cpp

  Log Message:
  -----------
  [lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455)

The the function is doing two fairly different things, depending on how
it is called. While this allows for some code reuse, it also makes it
hard to override it correctly. Possibly for this reason
ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it
to reimplement some of its functionality, most notably caching of
generated children.

Splitting this up makes it easier to move the caching to a common place
(and hopefully makes the code easier to follow in general).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list