[PATCH] D97525: [llvm][utils] Support dereferencing llvm::Optional lldb formatter
Dave Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 07:37:10 PST 2021
kastiglione added a comment.
@teemperor I switched `dict` to `internal_dict` because more code uses `internal_dict`, and because variables named `dict` shadow the `dict` constructor. The `dict` constructor isn't used, but I think it's better to avoid shadowing it.
================
Comment at: llvm/utils/lldbDataFormatters.py:141
+ return self.valobj.GetChildAtIndex(index)
+ return GetOptionalValue(self.valobj) or lldb.SBValue()
----------------
@teemperor this is why the `import lldb` is needed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97525/new/
https://reviews.llvm.org/D97525
More information about the llvm-commits
mailing list