#ifndef LLD_MACHO_RELOCATIONS_H
#define LLD_MACHO_RELOCATIONS_H
#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/Endian.h"
#include <cstddef>
#include <cstdint>
namespace lld::macho {
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(…);
class Symbol;
class InputSection;
enum class RelocAttrBits { … };
struct RelocAttrs { … };
struct Reloc { … };
bool validateSymbolRelocation(const Symbol *, const InputSection *,
const Reloc &);
void reportRangeError(void *loc, const Reloc &, const llvm::Twine &v,
uint8_t bits, int64_t min, uint64_t max);
struct SymbolDiagnostic { … };
void reportRangeError(void *loc, SymbolDiagnostic, const llvm::Twine &v,
uint8_t bits, int64_t min, uint64_t max);
template <typename Diagnostic>
inline void checkInt(void *loc, Diagnostic d, int64_t v, int bits) { … }
template <typename Diagnostic>
inline void checkUInt(void *loc, Diagnostic d, uint64_t v, int bits) { … }
inline void writeAddress(uint8_t *loc, uint64_t addr, uint8_t length) { … }
InputSection *offsetToInputSection(uint64_t *);
extern const RelocAttrs invalidRelocAttrs;
}
#endif