LLVM
10.0.0
lib
TextAPI
MachO
TextStubCommon.h
Go to the documentation of this file.
1
//===- TextStubCommon.h ---------------------------------------------------===//
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
// Defines common Text Stub YAML mappings.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_TEXTAPI_TEXT_STUB_COMMON_H
14
#define LLVM_TEXTAPI_TEXT_STUB_COMMON_H
15
16
#include "
llvm/ADT/StringRef.h
"
17
#include "
llvm/ADT/StringSwitch.h
"
18
#include "
llvm/Support/YAMLTraits.h
"
19
#include "
llvm/TextAPI/MachO/Architecture.h
"
20
#include "
llvm/TextAPI/MachO/ArchitectureSet.h
"
21
#include "
llvm/TextAPI/MachO/InterfaceFile.h
"
22
#include "
llvm/TextAPI/MachO/PackedVersion.h
"
23
24
using
UUID
= std::pair<llvm::MachO::Target, std::string>;
25
26
LLVM_YAML_STRONG_TYPEDEF(
llvm::StringRef
, FlowStringRef)
27
LLVM_YAML_STRONG_TYPEDEF(uint8_t, SwiftVersion)
28
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(
UUID
)
29
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(FlowStringRef)
30
31
namespace
llvm
{
32
namespace
yaml {
33
34
template
<>
struct
ScalarTraits<FlowStringRef> {
35
static
void
output(
const
FlowStringRef &,
void
*,
raw_ostream
&);
36
static
StringRef
input(
StringRef
,
void
*, FlowStringRef &);
37
static
QuotingType mustQuote(
StringRef
);
38
};
39
40
template
<>
struct
ScalarEnumerationTraits<MachO::
ObjCConstraintType
> {
41
static
void
enumeration(IO &,
MachO::ObjCConstraintType
&);
42
};
43
44
template
<>
struct
ScalarTraits<MachO::
PlatformSet
> {
45
static
void
output(
const
MachO::PlatformSet
&,
void
*,
raw_ostream
&);
46
static
StringRef
input(
StringRef
,
void
*,
MachO::PlatformSet
&);
47
static
QuotingType mustQuote(
StringRef
);
48
};
49
50
template
<>
struct
ScalarBitSetTraits<MachO::ArchitectureSet> {
51
static
void
bitset(IO &,
MachO::ArchitectureSet
&);
52
};
53
54
template
<>
struct
ScalarTraits<MachO::
Architecture
> {
55
static
void
output(
const
MachO::Architecture
&,
void
*,
raw_ostream
&);
56
static
StringRef
input(
StringRef
,
void
*,
MachO::Architecture
&);
57
static
QuotingType mustQuote(
StringRef
);
58
};
59
60
template
<>
struct
ScalarTraits<MachO::PackedVersion> {
61
static
void
output(
const
MachO::PackedVersion
&,
void
*,
raw_ostream
&);
62
static
StringRef
input(
StringRef
,
void
*,
MachO::PackedVersion
&);
63
static
QuotingType mustQuote(
StringRef
);
64
};
65
66
template
<>
struct
ScalarTraits<SwiftVersion> {
67
static
void
output(
const
SwiftVersion &,
void
*,
raw_ostream
&);
68
static
StringRef
input(
StringRef
,
void
*, SwiftVersion &);
69
static
QuotingType mustQuote(
StringRef
);
70
};
71
72
template
<>
struct
ScalarTraits<
UUID
> {
73
static
void
output(
const
UUID
&,
void
*,
raw_ostream
&);
74
static
StringRef
input(
StringRef
,
void
*,
UUID
&);
75
static
QuotingType mustQuote(
StringRef
);
76
};
77
78
}
// end namespace yaml.
79
}
// end namespace llvm.
80
81
#endif // LLVM_TEXTAPI_TEXT_STUB_COMMON_H
InterfaceFile.h
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:23
llvm::MachO::PackedVersion
Definition:
PackedVersion.h:22
YAMLTraits.h
StringSwitch.h
llvm::MachO::PlatformSet
SmallSet< PlatformKind, 3 > PlatformSet
Definition:
Platform.h:35
llvm::SmallSet
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
Definition:
SmallSet.h:134
llvm::MachO::ObjCConstraintType
ObjCConstraintType
Defines a list of Objective-C constraints.
Definition:
InterfaceFile.h:37
llvm::MachO::Architecture
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
Definition:
Architecture.h:24
StringRef.h
UUID
std::pair< llvm::MachO::Target, std::string > UUID
Definition:
TextStubCommon.h:24
Architecture.h
llvm::MachO::ArchitectureSet
Definition:
ArchitectureSet.h:26
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition:
raw_ostream.h:46
PackedVersion.h
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:54
ArchitectureSet.h
Generated on Tue Mar 24 2020 13:13:20 for LLVM by
1.8.13