[all-commits] [llvm/llvm-project] 408456: [llvm][utils] Support dereferencing llvm::Optional...
Dave Lee via All-commits
all-commits at lists.llvm.org
Fri Feb 26 07:43:53 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 408456f53eccd9b2280840aff8fa99f865024544
https://github.com/llvm/llvm-project/commit/408456f53eccd9b2280840aff8fa99f865024544
Author: Dave Lee <davelee.com at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M llvm/utils/lldbDataFormatters.py
Log Message:
-----------
[llvm][utils] Support dereferencing llvm::Optional lldb formatter
Add deref support to `llvm::Optional` in `lldbDataFormatters.py`.
This creates a synthetic provider that adds dereference support, but otherwise proxies all access to the underlying value.
With this change, an optional value can be displayed by running `v *someOptional`, and its contents can be accessed with the arrow `operator->`, for example `v someOpt->HasThing`. This matches expressions usable from expression evaluation.
See also D97165 and D97524.
Differential Revision: https://reviews.llvm.org/D97525
More information about the All-commits
mailing list