Coverage Report

Created: 2018-12-15 01:41

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include/lld/Common/LLVM.h
Line
Count
Source
1
//===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file forward declares and imports various common LLVM datatypes that
11
// lld wants to use unqualified.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLD_COMMON_LLVM_H
16
#define LLD_COMMON_LLVM_H
17
18
// This should be the only #include, force #includes of all the others on
19
// clients.
20
#include "llvm/ADT/Hashing.h"
21
#include "llvm/Support/Casting.h"
22
#include <utility>
23
24
namespace llvm {
25
// ADT's.
26
class raw_ostream;
27
class Error;
28
class StringRef;
29
class Twine;
30
class MemoryBuffer;
31
class MemoryBufferRef;
32
template <typename T> class ArrayRef;
33
template <unsigned InternalLen> class SmallString;
34
template <typename T, unsigned N> class SmallVector;
35
template <typename T> class ErrorOr;
36
template <typename T> class Expected;
37
38
namespace object {
39
class WasmObjectFile;
40
struct WasmSection;
41
struct WasmSegment;
42
class WasmSymbol;
43
} // namespace object
44
45
namespace wasm {
46
struct WasmEvent;
47
struct WasmEventType;
48
struct WasmFunction;
49
struct WasmGlobal;
50
struct WasmGlobalType;
51
struct WasmRelocation;
52
struct WasmSignature;
53
} // namespace wasm
54
} // namespace llvm
55
56
namespace lld {
57
// Casting operators.
58
using llvm::cast;
59
using llvm::cast_or_null;
60
using llvm::dyn_cast;
61
using llvm::dyn_cast_or_null;
62
using llvm::isa;
63
64
// ADT's.
65
using llvm::ArrayRef;
66
using llvm::Error;
67
using llvm::ErrorOr;
68
using llvm::Expected;
69
using llvm::MemoryBuffer;
70
using llvm::MemoryBufferRef;
71
using llvm::raw_ostream;
72
using llvm::SmallString;
73
using llvm::SmallVector;
74
using llvm::StringRef;
75
using llvm::Twine;
76
77
using llvm::object::WasmObjectFile;
78
using llvm::object::WasmSection;
79
using llvm::object::WasmSegment;
80
using llvm::object::WasmSymbol;
81
using llvm::wasm::WasmEvent;
82
using llvm::wasm::WasmEventType;
83
using llvm::wasm::WasmFunction;
84
using llvm::wasm::WasmGlobal;
85
using llvm::wasm::WasmGlobalType;
86
using llvm::wasm::WasmRelocation;
87
using llvm::wasm::WasmSignature;
88
} // end namespace lld.
89
90
namespace std {
91
template <> struct hash<llvm::StringRef> {
92
public:
93
343
  size_t operator()(const llvm::StringRef &s) const {
94
343
    return llvm::hash_value(s);
95
343
  }
96
};
97
} // namespace std
98
99
#endif