diff options
author | Dave Lee <davelee.com@gmail.com> | 2023-03-23 21:43:32 -0700 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2023-03-24 14:07:31 -0700 |
commit | 23349d83a98f23e67ff0321dad7c378b117ce6aa (patch) | |
tree | e92bde6c7ebd3e3e719e9126e91c4dfd2cfc53e6 /lldb/source/Commands/CommandObjectExpression.cpp | |
parent | 9fee241122fdf0d8747f0922741bb1cae0c1c53a (diff) | |
download | llvm-23349d83a98f23e67ff0321dad7c378b117ce6aa.zip llvm-23349d83a98f23e67ff0321dad7c378b117ce6aa.tar.gz llvm-23349d83a98f23e67ff0321dad7c378b117ce6aa.tar.bz2 |
[lldb] Add ability to hide the root name of a value
When printing a value, allow the root value's name to be elided, without omiting the
names of child values.
At the API level, this adds `SetHideRootName()`, which joins the existing
`SetHideName()` function.
This functionality is used by `dwim-print` and `expression`.
Fixes an issue identified by @jgorbe in https://reviews.llvm.org/D145609.
Differential Revision: https://reviews.llvm.org/D146783
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 2658677..5d68f66 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -456,7 +456,7 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr, DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions( m_command_options.m_verbosity, format)); - options.SetHideName(eval_options.GetSuppressPersistentResult()); + options.SetHideRootName(eval_options.GetSuppressPersistentResult()); options.SetVariableFormatDisplayLanguage( result_valobj_sp->GetPreferredDisplayLanguage()); |