From 23349d83a98f23e67ff0321dad7c378b117ce6aa Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 23 Mar 2023 21:43:32 -0700 Subject: [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 --- lldb/source/Commands/CommandObjectExpression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') 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()); -- cgit v1.1