//===- bolt/Core/Relocation.h - Object file relocations ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file contains the declaration of Relocation class, which represents a // relocation in an object or a binary file. // //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_RELOCATION_H #define BOLT_CORE_RELOCATION_H #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCStreamer.h" #include "llvm/TargetParser/Triple.h" namespace llvm { class MCSymbol; class raw_ostream; namespace ELF { /// Relocation type mask that was accidentally output by bfd 2.30 linker. enum { … }; } // namespace ELF namespace bolt { /// Relocation class. struct Relocation { … }; /// Relocation ordering by offset. inline bool operator<(const Relocation &A, const Relocation &B) { … } inline bool operator<(const Relocation &A, uint64_t B) { … } inline bool operator<(uint64_t A, const Relocation &B) { … } inline raw_ostream &operator<<(raw_ostream &OS, const Relocation &Rel) { … } } // namespace bolt } // namespace llvm #endif