LLVM: include/llvm/MC/SectionKind.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_MC_SECTIONKIND_H
10#define LLVM_MC_SECTIONKIND_H
11
12namespace llvm {
13
14
15
16
17
18
19
20
21
23 enum Kind {
24
25 Metadata,
26
27
28
29 Exclude,
30
31
32 Text,
33
34
35 ExecuteOnly,
36
37
38
39
40 ReadOnly,
41
42
43
44
45
46
47
48 Mergeable1ByteCString,
49
50
51 Mergeable2ByteCString,
52
53
54 Mergeable4ByteCString,
55
56
57
58
59
60
61
62 MergeableConst4,
63
64
65
66 MergeableConst8,
67
68
69
70 MergeableConst16,
71
72
73
74 MergeableConst32,
75
76
77
78
79
80
81
82
83
84 ThreadBSS,
85
86
87 ThreadData,
88
89
90 ThreadBSSLocal,
91
92
93
94
95
96 BSS,
97
98
99
100 BSSLocal,
101
102
103 BSSExtern,
104
105
106
107
108 Common,
109
110
111 Data,
112
113
114
115
116
117
118
119 ReadOnlyWithRel
120 } K : 8;
121public:
122
123 bool isMetadata() const { return K == Metadata; }
124
125 bool isExclude() const { return K == Exclude; }
126
127 bool isText() const { return K == Text || K == ExecuteOnly; }
128
130
135
137 return K == Mergeable1ByteCString || K == Mergeable2ByteCString ||
138 K == Mergeable4ByteCString;
139 }
143
145 return K == MergeableConst4 || K == MergeableConst8 ||
146 K == MergeableConst16 || K == MergeableConst32;
147 }
152
156
158 return K == ThreadData || K == ThreadBSS || K == ThreadBSSLocal;
159 }
160
161 bool isThreadBSS() const { return K == ThreadBSS || K == ThreadBSSLocal; }
164
168
169 bool isBSS() const { return K == BSS || K == BSSLocal || K == BSSExtern; }
170 bool isBSSLocal() const { return K == BSSLocal; }
172
173 bool isCommon() const { return K == Common; }
174
175 bool isData() const { return K == Data; }
176
178 return K == ReadOnlyWithRel;
179 }
180private:
183 Res.K = K;
184 return Res;
185 }
186public:
187
194 return get(Mergeable1ByteCString);
195 }
197 return get(Mergeable2ByteCString);
198 }
200 return get(Mergeable4ByteCString);
201 }
215};
216
217}
218
219#endif
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition SectionKind.h:22
static SectionKind getThreadData()
Definition SectionKind.h:207
bool isCommon() const
Definition SectionKind.h:173
bool isBSS() const
Definition SectionKind.h:169
static SectionKind getBSSExtern()
Definition SectionKind.h:211
bool isMergeable2ByteCString() const
Definition SectionKind.h:141
static SectionKind getMetadata()
Definition SectionKind.h:188
bool isThreadBSSLocal() const
Definition SectionKind.h:163
bool isReadOnlyWithRel() const
Definition SectionKind.h:177
static SectionKind getMergeable2ByteCString()
Definition SectionKind.h:196
bool isMergeableConst4() const
Definition SectionKind.h:148
static SectionKind getExclude()
Definition SectionKind.h:189
static SectionKind getBSSLocal()
Definition SectionKind.h:210
static SectionKind getMergeableConst4()
Definition SectionKind.h:202
static SectionKind getCommon()
Definition SectionKind.h:212
static SectionKind getText()
Definition SectionKind.h:190
static SectionKind getThreadBSSLocal()
Definition SectionKind.h:208
static SectionKind getReadOnlyWithRel()
Definition SectionKind.h:214
bool isMergeableConst() const
Definition SectionKind.h:144
bool isBSSLocal() const
Definition SectionKind.h:170
bool isMergeableConst8() const
Definition SectionKind.h:149
static SectionKind getData()
Definition SectionKind.h:213
bool isExclude() const
Definition SectionKind.h:125
bool isMetadata() const
Definition SectionKind.h:123
static SectionKind getMergeableConst8()
Definition SectionKind.h:203
bool isMergeable1ByteCString() const
Definition SectionKind.h:140
bool isThreadBSS() const
Definition SectionKind.h:161
bool isThreadLocal() const
Definition SectionKind.h:157
bool isBSSExtern() const
Definition SectionKind.h:171
bool isText() const
Definition SectionKind.h:127
static SectionKind getBSS()
Definition SectionKind.h:209
static SectionKind getThreadBSS()
Definition SectionKind.h:206
bool isMergeableConst32() const
Definition SectionKind.h:151
bool isExecuteOnly() const
Definition SectionKind.h:129
bool isThreadData() const
Definition SectionKind.h:162
bool isReadOnly() const
Definition SectionKind.h:131
bool isMergeableCString() const
Definition SectionKind.h:136
static SectionKind getMergeableConst16()
Definition SectionKind.h:204
bool isGlobalWriteableData() const
Definition SectionKind.h:165
bool isMergeable4ByteCString() const
Definition SectionKind.h:142
static SectionKind getMergeable4ByteCString()
Definition SectionKind.h:199
bool isData() const
Definition SectionKind.h:175
static SectionKind getExecuteOnly()
Definition SectionKind.h:191
bool isMergeableConst16() const
Definition SectionKind.h:150
static SectionKind getMergeable1ByteCString()
Definition SectionKind.h:193
bool isWriteable() const
Definition SectionKind.h:153
static SectionKind getReadOnly()
Definition SectionKind.h:192
static SectionKind getMergeableConst32()
Definition SectionKind.h:205
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)