llvm/lld/include/lld/Common/LLVM.h

//===--- LLVM.h - Import various common LLVM datatypes ----------*- 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 forward declares and imports various common LLVM datatypes that
// lld wants to use unqualified.
//
//===----------------------------------------------------------------------===//

#ifndef LLD_COMMON_LLVM_H
#define LLD_COMMON_LLVM_H

// This should be the only #include, force #includes of all the others on
// clients.
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include <utility>

namespace llvm {
// ADT's.
class raw_ostream;
class Error;
class StringRef;
class Twine;
class MemoryBuffer;
class MemoryBufferRef;
template <typename T> class ArrayRef;
template <typename T> class MutableArrayRef;
template <unsigned InternalLen> class SmallString;
template <typename T, unsigned N> class SmallVector;
template <typename T> class ErrorOr;
template <typename T> class Expected;

namespace object {
class WasmObjectFile;
struct WasmSection;
struct WasmSegment;
class WasmSymbol;
} // namespace object

namespace wasm {
struct WasmTag;
struct WasmFunction;
struct WasmGlobal;
struct WasmGlobalType;
struct WasmInitExpr;
struct WasmLimits;
struct WasmRelocation;
struct WasmSignature;
struct WasmTable;
struct WasmTableType;
} // namespace wasm
} // namespace llvm

namespace lld {
llvm::raw_ostream &outs();
llvm::raw_ostream &errs();

// Casting operators.
cast;
cast_or_null;
dyn_cast;
dyn_cast_or_null;
isa;

// ADT's.
ArrayRef;
MutableArrayRef;
Error;
ErrorOr;
Expected;
MemoryBuffer;
MemoryBufferRef;
raw_ostream;
SmallString;
SmallVector;
StringRef;
Twine;

WasmObjectFile;
WasmSection;
WasmSegment;
WasmSymbol;
WasmFunction;
WasmGlobal;
WasmGlobalType;
WasmInitExpr;
WasmLimits;
WasmRelocation;
WasmSignature;
WasmTable;
WasmTableType;
WasmTag;
} // end namespace lld.

namespace std {
template <> struct hash<llvm::StringRef> {};
} // namespace std

#endif