llvm/llvm/include/llvm/Object/XCOFFObjectFile.h

//===- XCOFFObjectFile.h - XCOFF object file implementation -----*- 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 declares the XCOFFObjectFile class.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_OBJECT_XCOFFOBJECTFILE_H
#define LLVM_OBJECT_XCOFFOBJECTFILE_H

#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/BinaryFormat/XCOFF.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Endian.h"
#include <limits>

namespace llvm {
namespace object {

class xcoff_symbol_iterator;

struct XCOFFFileHeader32 {};

struct XCOFFFileHeader64 {};

template <typename T> struct XCOFFAuxiliaryHeader {};

struct XCOFFAuxiliaryHeader32 : XCOFFAuxiliaryHeader<XCOFFAuxiliaryHeader32> {};

struct XCOFFAuxiliaryHeader64 : XCOFFAuxiliaryHeader<XCOFFAuxiliaryHeader64> {};

template <typename T> struct XCOFFSectionHeader {};

// Explicit extern template declarations.
struct XCOFFSectionHeader32;
struct XCOFFSectionHeader64;
extern template struct XCOFFSectionHeader<XCOFFSectionHeader32>;
extern template struct XCOFFSectionHeader<XCOFFSectionHeader64>;

struct XCOFFSectionHeader32 : XCOFFSectionHeader<XCOFFSectionHeader32> {};

struct XCOFFSectionHeader64 : XCOFFSectionHeader<XCOFFSectionHeader64> {};

struct LoaderSectionHeader32;
struct LoaderSectionHeader64;
struct LoaderSectionSymbolEntry32 {};

struct LoaderSectionSymbolEntry64 {};

struct LoaderSectionRelocationEntry32 {};

struct LoaderSectionRelocationEntry64 {};

struct LoaderSectionHeader32 {};

struct LoaderSectionHeader64 {};

template <typename AddressType> struct ExceptionSectionEntry {};

ExceptionSectionEntry32;
ExceptionSectionEntry64;

// Explicit extern template declarations.
extern template struct ExceptionSectionEntry<support::ubig32_t>;
extern template struct ExceptionSectionEntry<support::ubig64_t>;

struct XCOFFStringTable {};

struct XCOFFCsectAuxEnt32 {};

struct XCOFFCsectAuxEnt64 {};

class XCOFFCsectAuxRef {};

struct XCOFFFileAuxEnt {};

struct XCOFFSectAuxEntForStat {}; // 32-bit XCOFF file only.

struct XCOFFFunctionAuxEnt32 {};

struct XCOFFFunctionAuxEnt64 {};

struct XCOFFExceptionAuxEnt {};

struct XCOFFBlockAuxEnt32 {};

struct XCOFFBlockAuxEnt64 {};

struct XCOFFSectAuxEntForDWARF32 {};

struct XCOFFSectAuxEntForDWARF64 {};

template <typename AddressType> struct XCOFFRelocation {};

extern template struct XCOFFRelocation<llvm::support::ubig32_t>;
extern template struct XCOFFRelocation<llvm::support::ubig64_t>;

struct XCOFFRelocation32 : XCOFFRelocation<llvm::support::ubig32_t> {};
struct XCOFFRelocation64 : XCOFFRelocation<llvm::support::ubig64_t> {};

class XCOFFSymbolRef;

class XCOFFObjectFile : public ObjectFile {}; // XCOFFObjectFile

CFileLanguageIdAndTypeIdType;

struct XCOFFSymbolEntry32 {};

struct XCOFFSymbolEntry64 {};

extern template LLVM_TEMPLATE_ABI Expected<ArrayRef<XCOFFRelocation32>>
XCOFFObjectFile::relocations<XCOFFSectionHeader32, XCOFFRelocation32>(
    const XCOFFSectionHeader32 &Sec) const;
extern template LLVM_TEMPLATE_ABI Expected<ArrayRef<XCOFFRelocation64>>
XCOFFObjectFile::relocations<XCOFFSectionHeader64, XCOFFRelocation64>(
    const XCOFFSectionHeader64 &Sec) const;

class XCOFFSymbolRef : public SymbolRef {};

class xcoff_symbol_iterator : public symbol_iterator {};

class TBVectorExt {};

/// This class provides methods to extract traceback table data from a buffer.
/// The various accessors may reference the buffer provided via the constructor.

class XCOFFTracebackTable {};

bool doesXCOFFTracebackTableBegin(ArrayRef<uint8_t> Bytes);
} // namespace object
} // namespace llvm

#endif // LLVM_OBJECT_XCOFFOBJECTFILE_H