llvm/llvm/tools/dsymutil/RelocationMap.h

//===- tools/dsymutil/RelocationMap.h -------------------------- *- 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
//
//===----------------------------------------------------------------------===//
//
/// \file
///
/// This file contains the class declaration of the RelocationMap
/// entity. RelocationMap lists all the relocations of all the
/// atoms used in the object files linked together to
/// produce an executable.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TOOLS_DSYMUTIL_RELOCATIONMAP_H
#define LLVM_TOOLS_DSYMUTIL_RELOCATIONMAP_H

#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/TargetParser/Triple.h"

#include <optional>
#include <string>
#include <vector>

namespace llvm {

class raw_ostream;

namespace dsymutil {

struct SymbolMapping {};

/// ValidReloc represents one relocation entry described by the RelocationMap.
/// It contains a list of DWARF relocations to apply to a linked binary.
class ValidReloc {};

/// The RelocationMap object stores the list of relocation entries for a binary
class RelocationMap {};

} // end namespace dsymutil
} // end namespace llvm

LLVM_YAML_IS_SEQUENCE_VECTOR(dsymutil::ValidReloc)

namespace llvm {
namespace yaml {

usingnamespacellvm::dsymutil;

template <> struct MappingTraits<dsymutil::ValidReloc> {};

template <> struct MappingTraits<dsymutil::RelocationMap> {};

template <> struct MappingTraits<std::unique_ptr<dsymutil::RelocationMap>> {};

template <> struct ScalarTraits<Triple> {};

} // end namespace yaml
} // end namespace llvm

#endif // LLVM_TOOLS_DSYMUTIL_RELOCATIONMAP_H