[Lldb-commits] [lldb] [lldb][ValueObject][NFC] Remove unused SyntheticChildrenFrontEnd member (PR #164249)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 20 06:04:36 PDT 2025


https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/164249

These `IsValid`/`SetValid` APIs are only ever used from 1 data-formatter in the Swift LLDB fork. Since all the APIs on
`SyntheticChildrenFrontEnd` are meant to be overriden, there is no good way to enforce calling `IsValid` from the base. And we should just let that 1 data-formatter manage its own `IsValid` state.

>From 0b37c45c667daad14247c1b2f597e79a4b0667b8 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Mon, 20 Oct 2025 14:01:45 +0100
Subject: [PATCH] [lldb][ValueObject][NFC] Remove unused
 SyntheticChildrenFrontEnd member

These `IsValid`/`SetValid` APIs are only ever used from 1 data-formatter
in the Swift LLDB fork. Since all the APIs on
`SyntheticChildrenFrontEnd` are meant to be overriden, there is no good
way to enforce calling `IsValid` from the base. And we should just let
that 1 data-formatter manage its own `IsValid` state.
---
 lldb/include/lldb/DataFormatters/TypeSynthetic.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
index b147d66def730..4c57a80ee104e 100644
--- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h
+++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
@@ -28,13 +28,9 @@ class SyntheticChildrenFrontEnd {
 protected:
   ValueObject &m_backend;
 
-  void SetValid(bool valid) { m_valid = valid; }
-
-  bool IsValid() { return m_valid; }
-
 public:
   SyntheticChildrenFrontEnd(ValueObject &backend)
-      : m_backend(backend), m_valid(true) {}
+      : m_backend(backend) {}
 
   virtual ~SyntheticChildrenFrontEnd() = default;
 
@@ -100,7 +96,6 @@ class SyntheticChildrenFrontEnd {
                                                 CompilerType type);
 
 private:
-  bool m_valid;
   SyntheticChildrenFrontEnd(const SyntheticChildrenFrontEnd &) = delete;
   const SyntheticChildrenFrontEnd &
   operator=(const SyntheticChildrenFrontEnd &) = delete;



More information about the lldb-commits mailing list