From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- llvm/lib/Object/ObjectFile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/Object/ObjectFile.cpp') diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp index 1be8f11751be..56a1d09097d4 100644 --- a/llvm/lib/Object/ObjectFile.cpp +++ b/llvm/lib/Object/ObjectFile.cpp @@ -96,6 +96,11 @@ bool ObjectFile::isBerkeleyData(DataRefImpl Sec) const { bool ObjectFile::isDebugSection(DataRefImpl Sec) const { return false; } +bool ObjectFile::hasDebugInfo() const { + return any_of(sections(), + [](SectionRef Sec) { return Sec.isDebugSection(); }); +} + Expected ObjectFile::getRelocatedSection(DataRefImpl Sec) const { return section_iterator(SectionRef(Sec, this)); @@ -169,6 +174,7 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type, case file_magic::macho_dynamically_linked_shared_lib_stub: case file_magic::macho_dsym_companion: case file_magic::macho_kext_bundle: + case file_magic::macho_file_set: return createMachOObjectFile(Object); case file_magic::coff_object: case file_magic::coff_import_library: -- cgit v1.2.3