[lldb] Remove unused functions in ObjectContainer (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 24 Aug 2022 19:46:12 +0000 (12:46 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 24 Aug 2022 21:26:16 +0000 (14:26 -0700)
lldb/include/lldb/Symbol/ObjectContainer.h
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h

index 4f0c736..41cae69 100644 (file)
@@ -52,16 +52,6 @@ public:
   /// from by the plug-in instance.
   ~ObjectContainer() override = default;
 
-  /// Dump a description of this object to a Stream.
-  ///
-  /// Dump a description of the current contents of this object to the
-  /// supplied stream \a s. The dumping should include the section list if it
-  /// has been parsed, and the symbol table if it has been parsed.
-  ///
-  /// \param[in] s
-  ///     The stream to which to dump the object description.
-  virtual void Dump(Stream *s) const = 0;
-
   /// Gets the architecture given an index.
   ///
   /// Copies the architecture specification for index \a idx.
@@ -142,20 +132,6 @@ public:
   ///     file exists in the container.
   virtual lldb::ObjectFileSP GetObjectFile(const FileSpec *file) = 0;
 
-  virtual bool ObjectAtIndexIsContainer(uint32_t object_idx) { return false; }
-
-  virtual ObjectFile *GetObjectFileAtIndex(uint32_t object_idx) {
-    return nullptr;
-  }
-
-  virtual ObjectContainer *GetObjectContainerAtIndex(uint32_t object_idx) {
-    return nullptr;
-  }
-
-  virtual const char *GetObjectNameAtIndex(uint32_t object_idx) const {
-    return nullptr;
-  }
-
 protected:
   // Member variables.
   FileSpec m_file; ///< The file that represents this container objects (which
index 9fe222e..957ecc2 100644 (file)
@@ -511,30 +511,6 @@ bool ObjectContainerBSDArchive::ParseHeader() {
   return m_archive_sp.get() != nullptr;
 }
 
-void ObjectContainerBSDArchive::Dump(Stream *s) const {
-  s->Printf("%p: ", static_cast<const void *>(this));
-  s->Indent();
-  const size_t num_archs = GetNumArchitectures();
-  const size_t num_objects = GetNumObjects();
-  s->Printf("ObjectContainerBSDArchive, num_archs = %" PRIu64
-            ", num_objects = %" PRIu64 "",
-            (uint64_t)num_archs, (uint64_t)num_objects);
-  uint32_t i;
-  ArchSpec arch;
-  s->IndentMore();
-  for (i = 0; i < num_archs; i++) {
-    s->Indent();
-    GetArchitectureAtIndex(i, arch);
-    s->Printf("arch[%u] = %s\n", i, arch.GetArchitectureName());
-  }
-  for (i = 0; i < num_objects; i++) {
-    s->Indent();
-    s->Printf("object[%u] = %s\n", i, GetObjectNameAtIndex(i));
-  }
-  s->IndentLess();
-  s->EOL();
-}
-
 FileSpec GetChildFileSpecificationsFromThin(llvm::StringRef childPath,
                                             const FileSpec &parentFileSpec) {
   llvm::SmallString<128> FullPath;
index ace072c..1e2ffce 100644 (file)
@@ -70,8 +70,6 @@ public:
     return 0;
   }
 
-  void Dump(lldb_private::Stream *s) const override;
-
   lldb::ObjectFileSP GetObjectFile(const lldb_private::FileSpec *file) override;
 
   // PluginInterface protocol
index daa2a30..78e0a4b 100644 (file)
@@ -116,29 +116,6 @@ bool ObjectContainerUniversalMachO::ParseHeader(
   return success;
 }
 
-void ObjectContainerUniversalMachO::Dump(Stream *s) const {
-  s->Printf("%p: ", static_cast<const void *>(this));
-  s->Indent();
-  const size_t num_archs = GetNumArchitectures();
-  const size_t num_objects = GetNumObjects();
-  s->Printf("ObjectContainerUniversalMachO, num_archs = %zu, num_objects = %zu",
-            num_archs, num_objects);
-  uint32_t i;
-  ArchSpec arch;
-  s->IndentMore();
-  for (i = 0; i < num_archs; i++) {
-    s->Indent();
-    GetArchitectureAtIndex(i, arch);
-    s->Printf("arch[%u] = %s\n", i, arch.GetArchitectureName());
-  }
-  for (i = 0; i < num_objects; i++) {
-    s->Indent();
-    s->Printf("object[%u] = %s\n", i, GetObjectNameAtIndex(i));
-  }
-  s->IndentLess();
-  s->EOL();
-}
-
 size_t ObjectContainerUniversalMachO::GetNumArchitectures() const {
   return m_header.nfat_arch;
 }
index 17f9c1e..4fbea93 100644 (file)
@@ -51,8 +51,6 @@ public:
   // Member Functions
   bool ParseHeader() override;
 
-  void Dump(lldb_private::Stream *s) const override;
-
   size_t GetNumArchitectures() const override;
 
   bool GetArchitectureAtIndex(uint32_t cpu_idx,