[all-commits] [llvm/llvm-project] 3a677b: [lldb] Add deref support to libc++ unique_ptr synt...
Dave Lee via All-commits
all-commits at lists.llvm.org
Fri Feb 26 07:39:22 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3a677b29a3b3f6a2539843db4d56ba59689fc0a0
https://github.com/llvm/llvm-project/commit/3a677b29a3b3f6a2539843db4d56ba59689fc0a0
Author: Dave Lee <davelee.com at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/main.cpp
Log Message:
-----------
[lldb] Add deref support to libc++ unique_ptr synthetic
Add frame variable dereference suppport to libc++ `std::unique_ptr`.
This change allows for commands like `v *thing_up` and `v thing_up->m_id`. These commands now work the same way they would with raw pointers, and as they would with expression. This is done by adding an unaccounted for child member named `$$dereference$$`.
Without this change, the command would have to be written as `v *thing_up.__value_` or v thing_up.__value_->m_id` which exposes internal structure and is more clumsy to type.
Additionally, the existing tests were updated. See also https://reviews.llvm.org/D97165 which added deref support for `std::shared_ptr`.
Differential Revision: https://reviews.llvm.org/D97524
More information about the All-commits
mailing list