Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:41

0001 //===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file forward declares and imports various common LLVM datatypes that
0010 // lld wants to use unqualified.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLD_COMMON_LLVM_H
0015 #define LLD_COMMON_LLVM_H
0016 
0017 // This should be the only #include, force #includes of all the others on
0018 // clients.
0019 #include "llvm/ADT/Hashing.h"
0020 #include "llvm/ADT/StringRef.h"
0021 #include "llvm/Support/Casting.h"
0022 #include <utility>
0023 
0024 namespace llvm {
0025 // ADT's.
0026 class raw_ostream;
0027 class Error;
0028 class StringRef;
0029 class Twine;
0030 class MemoryBuffer;
0031 class MemoryBufferRef;
0032 template <typename T> class ArrayRef;
0033 template <typename T> class MutableArrayRef;
0034 template <unsigned InternalLen> class SmallString;
0035 template <typename T, unsigned N> class SmallVector;
0036 template <typename T> class ErrorOr;
0037 template <typename T> class Expected;
0038 
0039 namespace object {
0040 class WasmObjectFile;
0041 struct WasmSection;
0042 struct WasmSegment;
0043 class WasmSymbol;
0044 } // namespace object
0045 
0046 namespace wasm {
0047 struct WasmTag;
0048 struct WasmFunction;
0049 struct WasmGlobal;
0050 struct WasmGlobalType;
0051 struct WasmInitExpr;
0052 struct WasmLimits;
0053 struct WasmRelocation;
0054 struct WasmSignature;
0055 struct WasmTable;
0056 struct WasmTableType;
0057 } // namespace wasm
0058 } // namespace llvm
0059 
0060 namespace lld {
0061 // Casting operators.
0062 using llvm::cast;
0063 using llvm::cast_or_null;
0064 using llvm::dyn_cast;
0065 using llvm::dyn_cast_or_null;
0066 using llvm::isa;
0067 
0068 // ADT's.
0069 using llvm::ArrayRef;
0070 using llvm::MutableArrayRef;
0071 using llvm::Error;
0072 using llvm::ErrorOr;
0073 using llvm::Expected;
0074 using llvm::MemoryBuffer;
0075 using llvm::MemoryBufferRef;
0076 using llvm::raw_ostream;
0077 using llvm::SmallString;
0078 using llvm::SmallVector;
0079 using llvm::StringRef;
0080 using llvm::Twine;
0081 
0082 using llvm::object::WasmObjectFile;
0083 using llvm::object::WasmSection;
0084 using llvm::object::WasmSegment;
0085 using llvm::object::WasmSymbol;
0086 using llvm::wasm::WasmFunction;
0087 using llvm::wasm::WasmGlobal;
0088 using llvm::wasm::WasmGlobalType;
0089 using llvm::wasm::WasmInitExpr;
0090 using llvm::wasm::WasmLimits;
0091 using llvm::wasm::WasmRelocation;
0092 using llvm::wasm::WasmSignature;
0093 using llvm::wasm::WasmTable;
0094 using llvm::wasm::WasmTableType;
0095 using llvm::wasm::WasmTag;
0096 } // end namespace lld.
0097 
0098 namespace std {
0099 template <> struct hash<llvm::StringRef> {
0100 public:
0101   size_t operator()(const llvm::StringRef &s) const {
0102     return llvm::hash_value(s);
0103   }
0104 };
0105 } // namespace std
0106 
0107 #endif