//===- bolt/Core/AddressMap.h - Input-output address map --------*- 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 the AddressMap class used for looking // up addresses in the output object. // //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_ADDRESS_MAP_H #define BOLT_CORE_ADDRESS_MAP_H #include "llvm/MC/MCSymbol.h" #include <optional> #include <unordered_map> namespace llvm { class MCStreamer; namespace bolt { class BinaryContext; /// Helper class to create a mapping from input entities to output addresses /// needed for updating debugging symbols and BAT. We emit a section containing /// <Input entity, Output MCSymbol> pairs to the object file and JITLink will /// transform this in <Input entity, Output address> pairs. The linker output /// can then be parsed and used to establish the mapping. /// /// The entities that can be mapped to output address are input addresses and /// labels (MCSymbol). Input addresses support one-to-many mapping. class AddressMap { … }; } // namespace bolt } // namespace llvm #endif