[lldb] Remove unused functions in ObjectContainer (NFC)

This commit is contained in:
Jonas Devlieghere 2022-08-24 12:46:12 -07:00
parent 4d3134866f
commit f01208781f
No known key found for this signature in database
GPG Key ID: 49CC0BD90FDEED4D
5 changed files with 0 additions and 75 deletions

View 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

View 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;

View 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

View 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;
}

View 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,