llvm.org GIT mirror llvm / eb2fde2
Comment formatting. Removing of unused #include and type forwarding. OCD is fun! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80030 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 11 years ago
1 changed file(s) with 51 addition(s) and 54 deletion(s). Raw diff Collapse all Expand all
1515 #ifndef LLVM_TARGET_ASM_INFO_H
1616 #define LLVM_TARGET_ASM_INFO_H
1717
18 #include "llvm/Support/DataTypes.h"
1918 #include
2019
2120 namespace llvm {
22 template class SmallVectorImpl;
23
2421 /// MCAsmInfo - This class is intended to be used as a base class for asm
2522 /// properties and features specific to the target.
2623 namespace ExceptionHandling { enum ExceptionsType { None, Dwarf, SjLj }; }
3330
3431 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
3532 /// section on this target. Null if this target doesn't support zerofill.
36 const char *ZeroFillDirective; // Default is null.
33 const char *ZeroFillDirective; // Default is null.
3734
3835 /// NonexecutableStackDirective - Directive for declaring to the
3936 /// linker and beyond that the emitted code does not require stack
4946 /// .long x-y
5047 /// is relocated if the relative locations of x and y change at linktime.
5148 /// We want both these things in different places.
52 bool NeedsSet; // Defaults to false.
49 bool NeedsSet; // Defaults to false.
5350
5451 /// MaxInstLength - This is the maximum possible length of an instruction,
5552 /// which is needed to compute the size of an inline asm.
56 unsigned MaxInstLength; // Defaults to 4.
53 unsigned MaxInstLength; // Defaults to 4.
5754
5855 /// PCSymbol - The symbol used to represent the current PC. Used in PC
5956 /// relative expressions.
60 const char *PCSymbol; // Defaults to "$".
57 const char *PCSymbol; // Defaults to "$".
6158
6259 /// SeparatorChar - This character, if specified, is used to separate
6360 /// instructions from each other when on the same line. This is used to
6461 /// measure inline asm instructions.
65 char SeparatorChar; // Defaults to ';'
62 char SeparatorChar; // Defaults to ';'
6663
6764 /// CommentColumn - This indicates the comment num (zero-based) at
6865 /// which asm comments should be printed.
69 unsigned CommentColumn; // Defaults to 60
66 unsigned CommentColumn; // Defaults to 60
7067
7168 /// CommentString - This indicates the comment character used by the
7269 /// assembler.
73 const char *CommentString; // Defaults to "#"
70 const char *CommentString; // Defaults to "#"
7471
7572 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
7673 /// onto all global symbols. This is often used for "_" or ".".
77 const char *GlobalPrefix; // Defaults to ""
74 const char *GlobalPrefix; // Defaults to ""
7875
7976 /// PrivateGlobalPrefix - This prefix is used for globals like constant
8077 /// pool entries that are completely private to the .s file and should not
8178 /// have names in the .o file. This is often "." or "L".
82 const char *PrivateGlobalPrefix; // Defaults to "."
79 const char *PrivateGlobalPrefix; // Defaults to "."
8380
8481 /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
8582 /// be passed through the assembler but be removed by the linker. This
8683 /// is "l" on Darwin, currently used for some ObjC metadata.
87 const char *LinkerPrivateGlobalPrefix; // Defaults to ""
84 const char *LinkerPrivateGlobalPrefix; // Defaults to ""
8885
8986 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
9087 /// emitted before jump tables with the specified prefix.
91 const char *JumpTableSpecialLabelPrefix; // Default to null.
88 const char *JumpTableSpecialLabelPrefix; // Default to null.
9289
9390 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
9491 /// will enclose any GlobalVariable (that isn't a function)
9592 ///
96 const char *GlobalVarAddrPrefix; // Defaults to ""
97 const char *GlobalVarAddrSuffix; // Defaults to ""
93 const char *GlobalVarAddrPrefix; // Defaults to ""
94 const char *GlobalVarAddrSuffix; // Defaults to ""
9895
9996 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
10097 /// will enclose any GlobalVariable that points to a function.
10198 ///
102 const char *FunctionAddrPrefix; // Defaults to ""
103 const char *FunctionAddrSuffix; // Defaults to ""
99 const char *FunctionAddrPrefix; // Defaults to ""
100 const char *FunctionAddrSuffix; // Defaults to ""
104101
105102 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
106103 /// enclose any personality function in the common frame section.
107104 ///
108 const char *PersonalityPrefix; // Defaults to ""
109 const char *PersonalitySuffix; // Defaults to ""
105 const char *PersonalityPrefix; // Defaults to ""
106 const char *PersonalitySuffix; // Defaults to ""
110107
111108 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
112109 /// for EH in Dwarf.
113110 ///
114 bool NeedsIndirectEncoding; // Defaults to false
111 bool NeedsIndirectEncoding; // Defaults to false
115112
116113 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
117114 /// emit before and after an inline assembly statement.
118 const char *InlineAsmStart; // Defaults to "#APP\n"
119 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
115 const char *InlineAsmStart; // Defaults to "#APP\n"
116 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
120117
121118 /// AssemblerDialect - Which dialect of an assembler variant to use.
122 unsigned AssemblerDialect; // Defaults to 0
119 unsigned AssemblerDialect; // Defaults to 0
123120
124121 /// AllowQuotesInName - This is true if the assembler allows for complex
125122 /// symbol names to be surrounded in quotes. This defaults to false.
131128 /// number of zero bytes emitted to the current section. Common cases are
132129 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
133130 /// Data*bitsDirective's will be used to emit zero bytes.
134 const char *ZeroDirective; // Defaults to "\t.zero\t"
135 const char *ZeroDirectiveSuffix; // Defaults to ""
131 const char *ZeroDirective; // Defaults to "\t.zero\t"
132 const char *ZeroDirectiveSuffix; // Defaults to ""
136133
137134 /// AsciiDirective - This directive allows emission of an ascii string with
138135 /// the standard C escape characters embedded into it.
139 const char *AsciiDirective; // Defaults to "\t.ascii\t"
136 const char *AsciiDirective; // Defaults to "\t.ascii\t"
140137
141138 /// AscizDirective - If not null, this allows for special handling of
142139 /// zero terminated strings on this target. This is commonly supported as
143140 /// ".asciz". If a target doesn't support this, it can be set to null.
144 const char *AscizDirective; // Defaults to "\t.asciz\t"
141 const char *AscizDirective; // Defaults to "\t.asciz\t"
145142
146143 /// DataDirectives - These directives are used to output some unit of
147144 /// integer data to the current section. If a data directive is set to
148145 /// null, smaller data directives will be used to emit the large sizes.
149 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
150 const char *Data16bitsDirective; // Defaults to "\t.short\t"
151 const char *Data32bitsDirective; // Defaults to "\t.long\t"
152 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
146 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
147 const char *Data16bitsDirective; // Defaults to "\t.short\t"
148 const char *Data32bitsDirective; // Defaults to "\t.long\t"
149 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
153150
154151 /// getDataASDirective - Return the directive that should be used to emit
155152 /// data of the specified size to the specified numeric address space.
161158 /// SunStyleELFSectionSwitchSyntax - This is true if this target uses "Sun
162159 /// Style" syntax for section switching ("#alloc,#write" etc) instead of the
163160 /// normal ELF syntax (,"a,w") in .section directives.
164 bool SunStyleELFSectionSwitchSyntax; // Defaults to false.
161 bool SunStyleELFSectionSwitchSyntax; // Defaults to false.
165162
166163 /// UsesELFSectionDirectiveForBSS - This is true if this target uses ELF
167164 /// '.section' directive before the '.bss' one. It's used for PPC/Linux
168165 /// which doesn't support the '.bss' directive only.
169 bool UsesELFSectionDirectiveForBSS; // Defaults to false.
166 bool UsesELFSectionDirectiveForBSS; // Defaults to false.
170167
171168 //===--- Alignment Information ----------------------------------------===//
172169
173170 /// AlignDirective - The directive used to emit round up to an alignment
174171 /// boundary.
175172 ///
176 const char *AlignDirective; // Defaults to "\t.align\t"
173 const char *AlignDirective; // Defaults to "\t.align\t"
177174
178175 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
179176 /// emits ".align N" directives, where N is the number of bytes to align to.
180177 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
181178 /// boundary.
182 bool AlignmentIsInBytes; // Defaults to true
179 bool AlignmentIsInBytes; // Defaults to true
183180
184181 /// TextAlignFillValue - If non-zero, this is used to fill the executable
185182 /// space created as the result of a alignment directive.
186 unsigned TextAlignFillValue;
183 unsigned TextAlignFillValue; // Defaults to 0
187184
188185 //===--- Section Switching Directives ---------------------------------===//
189186
190187 /// JumpTableDirective - if non-null, the directive to emit before jump
191188 /// table entries. FIXME: REMOVE THIS.
192 const char *JumpTableDirective;
193 const char *PICJumpTableDirective;
189 const char *JumpTableDirective; // Defaults to NULL.
190 const char *PICJumpTableDirective; // Defaults to NULL.
194191
195192
196193 //===--- Global Variable Emission Directives --------------------------===//
197194
198195 /// GlobalDirective - This is the directive used to declare a global entity.
199196 ///
200 const char *GlobalDirective; // Defaults to NULL.
197 const char *GlobalDirective; // Defaults to NULL.
201198
202199 /// ExternDirective - This is the directive used to declare external
203200 /// globals.
204201 ///
205 const char *ExternDirective; // Defaults to NULL.
202 const char *ExternDirective; // Defaults to NULL.
206203
207204 /// SetDirective - This is the name of a directive that can be used to tell
208205 /// the assembler to set the value of a variable to some expression.
209 const char *SetDirective; // Defaults to null.
206 const char *SetDirective; // Defaults to null.
210207
211208 /// LCOMMDirective - This is the name of a directive (if supported) that can
212209 /// be used to efficiently declare a local (internal) block of zero
213210 /// initialized data in the .bss/.data section. The syntax expected is:
214211 /// @verbatim SYMBOLNAME LENGTHINBYTES, ALIGNMENT
215212 /// @endverbatim
216 const char *LCOMMDirective; // Defaults to null.
217
218 const char *COMMDirective; // Defaults to "\t.comm\t".
213 const char *LCOMMDirective; // Defaults to null.
214
215 const char *COMMDirective; // Defaults to "\t.comm\t".
219216
220217 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
221218 /// argument that specifies the alignment of the declaration.
222 bool COMMDirectiveTakesAlignment; // Defaults to true.
219 bool COMMDirectiveTakesAlignment; // Defaults to true.
223220
224221 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
225222 /// directives, this is true for most ELF targets.
226 bool HasDotTypeDotSizeDirective; // Defaults to true.
223 bool HasDotTypeDotSizeDirective; // Defaults to true.
227224
228225 /// HasSingleParameterDotFile - True if the target has a single parameter
229226 /// .file directive, this is true for ELF targets.
230 bool HasSingleParameterDotFile; // Defaults to true.
227 bool HasSingleParameterDotFile; // Defaults to true.
231228
232229 /// UsedDirective - This directive, if non-null, is used to declare a global
233230 /// as being used somehow that the assembler can't see. This prevents dead
234231 /// code elimination on some targets.
235 const char *UsedDirective; // Defaults to null.
232 const char *UsedDirective; // Defaults to NULL.
236233
237234 /// WeakRefDirective - This directive, if non-null, is used to declare a
238235 /// global as being a weak undefined symbol.
239 const char *WeakRefDirective; // Defaults to null.
236 const char *WeakRefDirective; // Defaults to NULL.
240237
241238 /// WeakDefDirective - This directive, if non-null, is used to declare a
242239 /// global as being a weak defined symbol.
243 const char *WeakDefDirective; // Defaults to null.
240 const char *WeakDefDirective; // Defaults to NULL.
244241
245242 /// HiddenDirective - This directive, if non-null, is used to declare a
246243 /// global or function as having hidden visibility.
247 const char *HiddenDirective; // Defaults to "\t.hidden\t".
244 const char *HiddenDirective; // Defaults to "\t.hidden\t".
248245
249246 /// ProtectedDirective - This directive, if non-null, is used to declare a
250247 /// global or function as having protected visibility.
251 const char *ProtectedDirective; // Defaults to "\t.protected\t".
248 const char *ProtectedDirective; // Defaults to "\t.protected\t".
252249
253250 //===--- Dwarf Emission Directives -----------------------------------===//
254251
302299
303300 //===--- CBE Asm Translation Table -----------------------------------===//
304301
305 const char *const *AsmTransCBE; // Defaults to empty
302 const char *const *AsmTransCBE; // Defaults to empty
306303
307304 public:
308305 explicit MCAsmInfo();