Coverage Report

Created: 2019-02-21 13:17

/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
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file forward declares and imports various common LLVM datatypes that
10
// lld wants to use unqualified.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLD_COMMON_LLVM_H
15
#define LLD_COMMON_LLVM_H
16
17
// This should be the only #include, force #includes of all the others on
18
// clients.
19
#include "llvm/ADT/Hashing.h"
20
#include "llvm/Support/Casting.h"
21
#include <utility>
22
23
namespace llvm {
24
// ADT's.
25
class raw_ostream;
26
class Error;
27
class StringRef;
28
class Twine;
29
class MemoryBuffer;
30
class MemoryBufferRef;
31
template <typename T> class ArrayRef;
32
template <unsigned InternalLen> class SmallString;
33
template <typename T, unsigned N> class SmallVector;
34
template <typename T> class ErrorOr;
35
template <typename T> class Expected;
36
37
namespace object {
38
class WasmObjectFile;
39
struct WasmSection;
40
struct WasmSegment;
41
class WasmSymbol;
42
} // namespace object
43
44
namespace wasm {
45
struct WasmEvent;
46
struct WasmEventType;
47
struct WasmFunction;
48
struct WasmGlobal;
49
struct WasmGlobalType;
50
struct WasmRelocation;
51
struct WasmSignature;
52
} // namespace wasm
53
} // namespace llvm
54
55
namespace lld {
56
// Casting operators.
57
using llvm::cast;
58
using llvm::cast_or_null;
59
using llvm::dyn_cast;
60
using llvm::dyn_cast_or_null;
61
using llvm::isa;
62
63
// ADT's.
64
using llvm::ArrayRef;
65
using llvm::Error;
66
using llvm::ErrorOr;
67
using llvm::Expected;
68
using llvm::MemoryBuffer;
69
using llvm::MemoryBufferRef;
70
using llvm::raw_ostream;
71
using llvm::SmallString;
72
using llvm::SmallVector;
73
using llvm::StringRef;
74
using llvm::Twine;
75
76
using llvm::object::WasmObjectFile;
77
using llvm::object::WasmSection;
78
using llvm::object::WasmSegment;
79
using llvm::object::WasmSymbol;
80
using llvm::wasm::WasmEvent;
81
using llvm::wasm::WasmEventType;
82
using llvm::wasm::WasmFunction;
83
using llvm::wasm::WasmGlobal;
84
using llvm::wasm::WasmGlobalType;
85
using llvm::wasm::WasmRelocation;
86
using llvm::wasm::WasmSignature;
87
} // end namespace lld.
88
89
namespace std {
90
template <> struct hash<llvm::StringRef> {
91
public:
92
343
  size_t operator()(const llvm::StringRef &s) const {
93
343
    return llvm::hash_value(s);
94
343
  }
95
};
96
} // namespace std
97
98
#endif