[Lldb-commits] [PATCH] D150129: [lldb] Refine call to decl printing helper (NFC)

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 15 15:21:10 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG8d4f0e079554: [lldb] Refine call to decl printing helper (NFC) (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150129/new/

https://reviews.llvm.org/D150129

Files:
  lldb/source/DataFormatters/ValueObjectPrinter.cpp


Index: lldb/source/DataFormatters/ValueObjectPrinter.cpp
===================================================================
--- lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -300,9 +300,14 @@
     ConstString type_name_cstr(typeName.GetString());
     ConstString var_name_cstr(varName.GetString());
 
+    DumpValueObjectOptions decl_print_options = m_options;
+    // Pass printing helpers an option object that indicates whether the name
+    // should be shown or hidden.
+    decl_print_options.SetHideName(!ShouldShowName());
+
     StreamString dest_stream;
     if (m_options.m_decl_printing_helper(type_name_cstr, var_name_cstr,
-                                         m_options, dest_stream)) {
+                                         decl_print_options, dest_stream)) {
       decl_printed = true;
       m_stream->PutCString(dest_stream.GetString());
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150129.522356.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230515/d975c8ba/attachment.bin>


More information about the lldb-commits mailing list