#ifndef LLD_MACHO_INPUT_FILES_H
#define LLD_MACHO_INPUT_FILES_H
#include "MachOStructs.h"
#include "Target.h"
#include "lld/Common/DWARF.h"
#include "lld/Common/LLVM.h"
#include "lld/Common/Memory.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
#include "llvm/Object/Archive.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Threading.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include <vector>
namespace llvm {
namespace lto {
class InputFile;
}
namespace MachO {
class InterfaceFile;
}
class TarWriter;
}
namespace lld {
namespace macho {
struct PlatformInfo;
class ConcatInputSection;
class Symbol;
class Defined;
class AliasSymbol;
struct Reloc;
enum class RefState : uint8_t;
extern std::unique_ptr<llvm::TarWriter> tar;
struct Subsection { … };
Subsections;
class InputFile;
class Section { … };
struct CallGraphEntry { … };
class InputFile { … };
struct FDE { … };
class ObjFile final : public InputFile { … };
class OpaqueFile final : public InputFile { … };
class DylibFile final : public InputFile { … };
class ArchiveFile final : public InputFile { … };
class BitcodeFile final : public InputFile { … };
extern llvm::SetVector<InputFile *> inputFiles;
extern llvm::DenseMap<llvm::CachedHashStringRef, MemoryBufferRef> cachedReads;
extern llvm::SmallVector<StringRef> unprocessedLCLinkerOptions;
std::optional<MemoryBufferRef> readFile(StringRef path);
void extract(InputFile &file, StringRef reason);
namespace detail {
template <class CommandType, class... Types>
std::vector<const CommandType *>
findCommands(const void *anyHdr, size_t maxCommands, Types... types) { … }
}
template <class CommandType = llvm::MachO::load_command, class... Types>
const CommandType *findCommand(const void *anyHdr, Types... types) { … }
template <class CommandType = llvm::MachO::load_command, class... Types>
std::vector<const CommandType *> findCommands(const void *anyHdr,
Types... types) { … }
std::string replaceThinLTOSuffix(StringRef path);
}
std::string toString(const macho::InputFile *file);
std::string toString(const macho::Section &);
}
#endif