18
18
#include " llvm/Support/CodeGen.h"
19
19
20
20
namespace llvm {
21
- class MCContext ;
22
- class MCSection ;
23
- class StringRef ;
21
+ class MCContext ;
22
+ class MCSection ;
23
+ class StringRef ;
24
24
25
25
class MCObjectFileInfo {
26
26
protected:
27
- // / CommDirectiveSupportsAlignment - True if .comm supports alignment. This
28
- // / is a hack for as long as we support 10.4 Tiger, whose assembler doesn't
29
- // / support alignment on comm.
27
+ // / True if .comm supports alignment. This is a hack for as long as we
28
+ // / support 10.4 Tiger, whose assembler doesn't support alignment on comm.
30
29
bool CommDirectiveSupportsAlignment;
31
30
32
- // / SupportsWeakEmptyEHFrame - True if target object file supports a
33
- // / weak_definition of constant 0 for an omitted EH frame.
31
+ // / True if target object file supports a weak_definition of constant 0 for an
32
+ // / omitted EH frame.
34
33
bool SupportsWeakOmittedEHFrame;
35
34
36
- // / SupportsCompactUnwindWithoutEHFrame - True if the target object file
37
- // / supports emitting a compact unwind section without an associated EH frame
38
- // / section.
35
+ // / True if the target object file supports emitting a compact unwind section
36
+ // / without an associated EH frame section.
39
37
bool SupportsCompactUnwindWithoutEHFrame;
40
38
41
- // / PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values
42
- // / for EH.
39
+ // / Some encoding values for EH.
43
40
unsigned PersonalityEncoding;
44
41
unsigned LSDAEncoding;
45
42
unsigned FDECFIEncoding;
@@ -49,16 +46,13 @@ class MCObjectFileInfo {
49
46
unsigned EHSectionType;
50
47
unsigned EHSectionFlags;
51
48
52
- // / CompactUnwindDwarfEHFrameOnly - Compact unwind encoding indicating that we
53
- // / should emit only an EH frame.
49
+ // / Compact unwind encoding indicating that we should emit only an EH frame.
54
50
unsigned CompactUnwindDwarfEHFrameOnly;
55
51
56
52
// / Section directive for standard text.
57
- // /
58
53
MCSection *TextSection;
59
54
60
55
// / Section directive for standard data.
61
- // /
62
56
MCSection *DataSection;
63
57
64
58
// / Section that is default initialized to zero.
@@ -101,7 +95,7 @@ class MCObjectFileInfo {
101
95
// can be enabled by a compiler flag.
102
96
MCSection *DwarfPubNamesSection;
103
97
104
- // DWARF5 Experimental Debug Info Sections
98
+ // / DWARF5 Experimental Debug Info Sections
105
99
// / DwarfAccelNamesSection, DwarfAccelObjCSection,
106
100
// / DwarfAccelNamespaceSection, DwarfAccelTypesSection -
107
101
// / If we use the DWARF accelerated hash tables then we want to emit these
@@ -111,7 +105,7 @@ class MCObjectFileInfo {
111
105
MCSection *DwarfAccelNamespaceSection;
112
106
MCSection *DwarfAccelTypesSection;
113
107
114
- // / These are used for the Fission separate debug information files.
108
+ // These are used for the Fission separate debug information files.
115
109
MCSection *DwarfInfoDWOSection;
116
110
MCSection *DwarfTypesDWOSection;
117
111
MCSection *DwarfAbbrevDWOSection;
@@ -121,32 +115,36 @@ class MCObjectFileInfo {
121
115
MCSection *DwarfStrOffDWOSection;
122
116
MCSection *DwarfAddrSection;
123
117
124
- // / Sections for newer gnu pubnames and pubtypes .
118
+ // / Section for newer gnu pubnames.
125
119
MCSection *DwarfGnuPubNamesSection;
120
+ // / Section for newer gnu pubtypes.
126
121
MCSection *DwarfGnuPubTypesSection;
127
122
128
123
MCSection *COFFDebugSymbolsSection;
129
124
130
- // Extra TLS Variable Data section. If the target needs to put additional
131
- // information for a TLS variable, it'll go here.
125
+ // / Extra TLS Variable Data section.
126
+ // /
127
+ // / If the target needs to put additional information for a TLS variable,
128
+ // / it'll go here.
132
129
MCSection *TLSExtraDataSection;
133
130
134
131
// / Section directive for Thread Local data. ELF, MachO and COFF.
135
132
MCSection *TLSDataSection; // Defaults to ".tdata".
136
133
137
- // / Section directive for Thread Local uninitialized data. Null if this target
138
- // / doesn't support a BSS section. ELF and MachO only.
134
+ // / Section directive for Thread Local uninitialized data.
135
+ // /
136
+ // / Null if this target doesn't support a BSS section. ELF and MachO only.
139
137
MCSection *TLSBSSSection; // Defaults to ".tbss".
140
138
141
139
// / StackMap section.
142
140
MCSection *StackMapSection;
143
141
144
- // / EH frame section. It is initialized on demand so it can be overwritten
145
- // / (with uniquing).
142
+ // / EH frame section.
143
+ // /
144
+ // / It is initialized on demand so it can be overwritten (with uniquing).
146
145
MCSection *EHFrameSection;
147
146
148
- // / ELF specific sections.
149
- // /
147
+ // ELF specific sections.
150
148
MCSection *DataRelSection;
151
149
const MCSection *DataRelLocalSection;
152
150
MCSection *DataRelROSection;
@@ -155,17 +153,16 @@ class MCObjectFileInfo {
155
153
MCSection *MergeableConst8Section;
156
154
MCSection *MergeableConst16Section;
157
155
158
- // / MachO specific sections.
159
- // /
156
+ // MachO specific sections.
160
157
161
- // / Section for thread local structure information. Contains the source code
162
- // / name of the variable, visibility and a pointer to the initial value
163
- // / (.tdata or .tbss).
158
+ // / Section for thread local structure information.
159
+ // /
160
+ // / Contains the source code name of the variable, visibility and a pointer to
161
+ // / the initial value (.tdata or .tbss).
164
162
MCSection *TLSTLVSection; // Defaults to ".tlv".
165
163
166
- // / TLSThreadInitSection - Section for thread local data initialization
167
- // / functions.
168
- const MCSection *TLSThreadInitSection; // Defaults to ".thread_init_func".
164
+ // / Section for thread local data initialization functions.
165
+ const MCSection *TLSThreadInitSection; // Defaults to ".thread_init_func".
169
166
170
167
MCSection *CStringSection;
171
168
MCSection *UStringSection;
@@ -182,7 +179,6 @@ class MCObjectFileInfo {
182
179
MCSection *NonLazySymbolPointerSection;
183
180
184
181
// / COFF specific sections.
185
- // /
186
182
MCSection *DrectveSection;
187
183
MCSection *PDataSection;
188
184
MCSection *XDataSection;
@@ -267,8 +263,7 @@ class MCObjectFileInfo {
267
263
268
264
MCSection *getStackMapSection () const { return StackMapSection; }
269
265
270
- // / ELF specific sections.
271
- // /
266
+ // ELF specific sections.
272
267
MCSection *getDataRelSection () const { return DataRelSection; }
273
268
const MCSection *getDataRelLocalSection () const {
274
269
return DataRelLocalSection;
@@ -285,8 +280,7 @@ class MCObjectFileInfo {
285
280
return MergeableConst16Section;
286
281
}
287
282
288
- // / MachO specific sections.
289
- // /
283
+ // MachO specific sections.
290
284
const MCSection *getTLSTLVSection () const { return TLSTLVSection; }
291
285
const MCSection *getTLSThreadInitSection () const {
292
286
return TLSThreadInitSection;
@@ -317,8 +311,7 @@ class MCObjectFileInfo {
317
311
return NonLazySymbolPointerSection;
318
312
}
319
313
320
- // / COFF specific sections.
321
- // /
314
+ // COFF specific sections.
322
315
MCSection *getDrectveSection () const { return DrectveSection; }
323
316
MCSection *getPDataSection () const { return PDataSection; }
324
317
MCSection *getXDataSection () const { return XDataSection; }
@@ -331,13 +324,9 @@ class MCObjectFileInfo {
331
324
}
332
325
333
326
enum Environment { IsMachO, IsELF, IsCOFF };
334
- Environment getObjectFileType () const {
335
- return Env;
336
- }
327
+ Environment getObjectFileType () const { return Env; }
337
328
338
- Reloc::Model getRelocM () const {
339
- return RelocM;
340
- }
329
+ Reloc::Model getRelocM () const { return RelocM; }
341
330
342
331
private:
343
332
Environment Env;
@@ -350,8 +339,7 @@ class MCObjectFileInfo {
350
339
void InitELFMCObjectFileInfo (Triple T);
351
340
void InitCOFFMCObjectFileInfo (Triple T);
352
341
353
- // / InitEHFrameSection - Initialize EHFrameSection on demand.
354
- // /
342
+ // / Initialize EHFrameSection on demand.
355
343
void InitEHFrameSection ();
356
344
357
345
public:
0 commit comments