Provide convenient helpers
[oota-llvm.git] / include / llvm / Target / TargetAsmInfo.h
1 //===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains a class to be used as the basis for target specific
11 // asm writers.  This class primarily takes care of global printing constants,
12 // which are used in very similar ways across all targets.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_TARGET_ASM_INFO_H
17 #define LLVM_TARGET_ASM_INFO_H
18
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/Support/DataTypes.h"
21 #include <string>
22
23 namespace llvm {
24   // DWARF encoding query type
25   namespace DwarfEncoding {
26     enum Target {
27       Data       = 0,
28       CodeLabels = 1,
29       Functions  = 2
30     };
31   }
32
33   namespace SectionKind {
34     enum Kind {
35       Unknown = 0,      ///< Custom section
36       Text,             ///< Text section
37       Data,             ///< Data section
38       BSS,              ///< BSS section
39       ROData,           ///< Readonly data section
40       RODataMergeStr,   ///< Readonly data section (mergeable strings)
41       RODataMergeConst, ///< Readonly data section (mergeable constants)
42       SmallData,        ///< Small data section
43       SmallBSS,         ///< Small bss section
44       SmallROData,      ///< Small readonly section
45       ThreadData,       ///< Initialized TLS data objects
46       ThreadBSS         ///< Uninitialized TLS data objects
47     };
48
49     static inline bool isReadOnly(Kind K) {
50       return (K == SectionKind::ROData ||
51               K == SectionKind::RODataMergeConst ||
52               K == SectionKind::RODataMergeStr ||
53               K == SectionKind::SmallROData);
54     }
55
56     static inline bool isBSS(Kind K) {
57       return (K == SectionKind::BSS ||
58               K == SectionKind::SmallBSS);
59     }
60   }
61
62   namespace SectionFlags {
63     const unsigned Invalid    = -1U;
64     const unsigned None       = 0;
65     const unsigned Code       = 1 << 0;  ///< Section contains code
66     const unsigned Writeable  = 1 << 1;  ///< Section is writeable
67     const unsigned BSS        = 1 << 2;  ///< Section contains only zeroes
68     const unsigned Mergeable  = 1 << 3;  ///< Section contains mergeable data
69     const unsigned Strings    = 1 << 4;  ///< Section contains C-type strings
70     const unsigned TLS        = 1 << 5;  ///< Section contains thread-local data
71     const unsigned Debug      = 1 << 6;  ///< Section contains debug data
72     const unsigned Linkonce   = 1 << 7;  ///< Section is linkonce
73     const unsigned Small      = 1 << 8;  ///< Section is small
74     const unsigned TypeFlags  = 0xFF;
75     // Some gap for future flags
76     const unsigned Named      = 1 << 23; ///< Section is named
77     const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
78
79     static inline unsigned getEntitySize(unsigned Flags) {
80       return (Flags >> 24) & 0xFF;
81     }
82
83     static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
84       return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
85     }
86   }
87
88   class TargetMachine;
89   class CallInst;
90   class GlobalValue;
91   class Type;
92
93   class Section {
94     friend class TargetAsmInfo;
95     friend class StringMapEntry<Section>;
96
97     std::string Name;
98     unsigned Flags;
99
100     explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
101   public:
102     bool isNamed() const { return Flags & SectionFlags::Named; }
103     unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
104     const std::string& getName() const { return Name; }
105   };
106
107   /// TargetAsmInfo - This class is intended to be used as a base class for asm
108   /// properties and features specific to the target.
109   class TargetAsmInfo {
110   private:
111     mutable StringMap<Section> Sections;
112   protected:
113     //===------------------------------------------------------------------===//
114     // Properties to be set by the target writer, used to configure asm printer.
115     //
116
117     /// TextSection - Section directive for standard text.
118     ///
119     const char *TextSection;              // Defaults to ".text".
120     const Section *TextSection_;
121
122     /// DataSection - Section directive for standard data.
123     ///
124     const char *DataSection;              // Defaults to ".data".
125     const Section *DataSection_;
126
127     /// BSSSection - Section directive for uninitialized data.  Null if this
128     /// target doesn't support a BSS section.
129     ///
130     const char *BSSSection;               // Default to ".bss".
131     const Section *BSSSection_;
132
133     /// ReadOnlySection - This is the directive that is emitted to switch to a
134     /// read-only section for constant data (e.g. data declared const,
135     /// jump tables).
136     const char *ReadOnlySection;          // Defaults to NULL
137     const Section *ReadOnlySection_;
138
139     /// SmallDataSection - This is the directive that is emitted to switch to a
140     /// small data section.
141     ///
142     const Section *SmallDataSection;      // Defaults to NULL
143
144     /// SmallBSSSection - This is the directive that is emitted to switch to a
145     /// small bss section.
146     ///
147     const Section *SmallBSSSection;       // Defaults to NULL
148
149     /// SmallRODataSection - This is the directive that is emitted to switch to 
150     /// a small read-only data section.
151     ///
152     const Section *SmallRODataSection;    // Defaults to NULL
153
154     /// TLSDataSection - Section directive for Thread Local data.
155     ///
156     const char *TLSDataSection;// Defaults to ".section .tdata,"awT",@progbits".
157     const Section *TLSDataSection_;
158
159     /// TLSBSSSection - Section directive for Thread Local uninitialized data.
160     /// Null if this target doesn't support a BSS section.
161     ///
162     const char *TLSBSSSection;// Default to ".section .tbss,"awT",@nobits".
163     const Section *TLSBSSSection_;
164
165     /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
166     /// section on this target.  Null if this target doesn't support zerofill.
167     const char *ZeroFillDirective;        // Default is null.
168
169     /// NonexecutableStackDirective - Directive for declaring to the
170     /// linker and beyond that the emitted code does not require stack
171     /// memory to be executable.
172     const char *NonexecutableStackDirective; // Default is null.
173
174     /// NeedsSet - True if target asm treats expressions in data directives
175     /// as linktime-relocatable.  For assembly-time computation, we need to
176     /// use a .set.  Thus:
177     /// .set w, x-y
178     /// .long w
179     /// is computed at assembly time, while
180     /// .long x-y
181     /// is relocated if the relative locations of x and y change at linktime.
182     /// We want both these things in different places.
183     bool NeedsSet;                        // Defaults to false.
184     
185     /// MaxInstLength - This is the maximum possible length of an instruction,
186     /// which is needed to compute the size of an inline asm.
187     unsigned MaxInstLength;               // Defaults to 4.
188     
189     /// PCSymbol - The symbol used to represent the current PC.  Used in PC
190     /// relative expressions.
191     const char *PCSymbol;                 // Defaults to "$".
192
193     /// SeparatorChar - This character, if specified, is used to separate
194     /// instructions from each other when on the same line.  This is used to
195     /// measure inline asm instructions.
196     char SeparatorChar;                   // Defaults to ';'
197
198     /// CommentString - This indicates the comment character used by the
199     /// assembler.
200     const char *CommentString;            // Defaults to "#"
201
202     /// GlobalPrefix - If this is set to a non-empty string, it is prepended
203     /// onto all global symbols.  This is often used for "_" or ".".
204     const char *GlobalPrefix;             // Defaults to ""
205
206     /// PrivateGlobalPrefix - This prefix is used for globals like constant
207     /// pool entries that are completely private to the .o file and should not
208     /// have names in the .o file.  This is often "." or "L".
209     const char *PrivateGlobalPrefix;      // Defaults to "."
210     
211     /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
212     /// emitted before jump tables with the specified prefix.
213     const char *JumpTableSpecialLabelPrefix;  // Default to null.
214     
215     /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
216     /// will enclose any GlobalVariable (that isn't a function)
217     ///
218     const char *GlobalVarAddrPrefix;      // Defaults to ""
219     const char *GlobalVarAddrSuffix;      // Defaults to ""
220
221     /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
222     /// will enclose any GlobalVariable that points to a function.
223     /// For example, this is used by the IA64 backend to materialize
224     /// function descriptors, by decorating the ".data8" object with the
225     /// @verbatim @fptr( ) @endverbatim
226     /// link-relocation operator.
227     ///
228     const char *FunctionAddrPrefix;       // Defaults to ""
229     const char *FunctionAddrSuffix;       // Defaults to ""
230
231     /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
232     /// enclose any personality function in the common frame section.
233     /// 
234     const char *PersonalityPrefix;        // Defaults to ""
235     const char *PersonalitySuffix;        // Defaults to ""
236
237     /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
238     /// for EH in Dwarf.
239     /// 
240     bool NeedsIndirectEncoding;           // Defaults to false
241
242     /// InlineAsmStart/End - If these are nonempty, they contain a directive to
243     /// emit before and after an inline assembly statement.
244     const char *InlineAsmStart;           // Defaults to "#APP\n"
245     const char *InlineAsmEnd;             // Defaults to "#NO_APP\n"
246
247     /// AssemblerDialect - Which dialect of an assembler variant to use.
248     unsigned AssemblerDialect;            // Defaults to 0
249
250     /// StringConstantPrefix - Prefix for FEs to use when generating unnamed
251     /// constant strings.  These names get run through the Mangler later; if
252     /// you want the Mangler not to add the GlobalPrefix as well, 
253     /// use '\1' as the first character.
254     const char *StringConstantPrefix;     // Defaults to ".str"
255
256     //===--- Data Emission Directives -------------------------------------===//
257
258     /// ZeroDirective - this should be set to the directive used to get some
259     /// number of zero bytes emitted to the current section.  Common cases are
260     /// "\t.zero\t" and "\t.space\t".  If this is set to null, the
261     /// Data*bitsDirective's will be used to emit zero bytes.
262     const char *ZeroDirective;            // Defaults to "\t.zero\t"
263     const char *ZeroDirectiveSuffix;      // Defaults to ""
264
265     /// AsciiDirective - This directive allows emission of an ascii string with
266     /// the standard C escape characters embedded into it.
267     const char *AsciiDirective;           // Defaults to "\t.ascii\t"
268     
269     /// AscizDirective - If not null, this allows for special handling of
270     /// zero terminated strings on this target.  This is commonly supported as
271     /// ".asciz".  If a target doesn't support this, it can be set to null.
272     const char *AscizDirective;           // Defaults to "\t.asciz\t"
273
274     /// DataDirectives - These directives are used to output some unit of
275     /// integer data to the current section.  If a data directive is set to
276     /// null, smaller data directives will be used to emit the large sizes.
277     const char *Data8bitsDirective;       // Defaults to "\t.byte\t"
278     const char *Data16bitsDirective;      // Defaults to "\t.short\t"
279     const char *Data32bitsDirective;      // Defaults to "\t.long\t"
280     const char *Data64bitsDirective;      // Defaults to "\t.quad\t"
281
282     //===--- Alignment Information ----------------------------------------===//
283
284     /// AlignDirective - The directive used to emit round up to an alignment
285     /// boundary.
286     ///
287     const char *AlignDirective;           // Defaults to "\t.align\t"
288
289     /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
290     /// emits ".align N" directives, where N is the number of bytes to align to.
291     /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
292     /// boundary.
293     bool AlignmentIsInBytes;              // Defaults to true
294
295     /// TextAlignFillValue - If non-zero, this is used to fill the executable
296     /// space created as the result of a alignment directive.
297     unsigned TextAlignFillValue;
298
299     //===--- Section Switching Directives ---------------------------------===//
300     
301     /// SwitchToSectionDirective - This is the directive used when we want to
302     /// emit a global to an arbitrary section.  The section name is emited after
303     /// this.
304     const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
305     
306     /// TextSectionStartSuffix - This is printed after each start of section
307     /// directive for text sections.
308     const char *TextSectionStartSuffix;   // Defaults to "".
309
310     /// DataSectionStartSuffix - This is printed after each start of section
311     /// directive for data sections.
312     const char *DataSectionStartSuffix;   // Defaults to "".
313     
314     /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
315     /// section with the section name and this suffix printed.
316     const char *SectionEndDirectiveSuffix;// Defaults to null.
317     
318     /// ConstantPoolSection - This is the section that we SwitchToSection right
319     /// before emitting the constant pool for a function.
320     const char *ConstantPoolSection;      // Defaults to "\t.section .rodata"
321
322     /// JumpTableDataSection - This is the section that we SwitchToSection right
323     /// before emitting the jump tables for a function when the relocation model
324     /// is not PIC.
325     const char *JumpTableDataSection;     // Defaults to "\t.section .rodata"
326     
327     /// JumpTableDirective - if non-null, the directive to emit before a jump
328     /// table.
329     const char *JumpTableDirective;
330
331     /// CStringSection - If not null, this allows for special handling of
332     /// cstring constants (null terminated string that does not contain any
333     /// other null bytes) on this target. This is commonly supported as
334     /// ".cstring".
335     const char *CStringSection;           // Defaults to NULL
336     const Section *CStringSection_;
337
338     /// StaticCtorsSection - This is the directive that is emitted to switch to
339     /// a section to emit the static constructor list.
340     /// Defaults to "\t.section .ctors,\"aw\",@progbits".
341     const char *StaticCtorsSection;
342
343     /// StaticDtorsSection - This is the directive that is emitted to switch to
344     /// a section to emit the static destructor list.
345     /// Defaults to "\t.section .dtors,\"aw\",@progbits".
346     const char *StaticDtorsSection;
347
348     /// FourByteConstantSection, EightByteConstantSection,
349     /// SixteenByteConstantSection - These are special sections where we place
350     /// 4-, 8-, and 16- byte constant literals.
351     const char *FourByteConstantSection;
352     const Section *FourByteConstantSection_;
353     const char *EightByteConstantSection;
354     const Section *EightByteConstantSection_;
355     const char *SixteenByteConstantSection;
356     const Section *SixteenByteConstantSection_;
357
358     //===--- Global Variable Emission Directives --------------------------===//
359     
360     /// GlobalDirective - This is the directive used to declare a global entity.
361     ///
362     const char *GlobalDirective;          // Defaults to NULL.
363     
364     /// SetDirective - This is the name of a directive that can be used to tell
365     /// the assembler to set the value of a variable to some expression.
366     const char *SetDirective;             // Defaults to null.
367     
368     /// LCOMMDirective - This is the name of a directive (if supported) that can
369     /// be used to efficiently declare a local (internal) block of zero
370     /// initialized data in the .bss/.data section.  The syntax expected is:
371     /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
372     /// @endverbatim
373     const char *LCOMMDirective;           // Defaults to null.
374     
375     const char *COMMDirective;            // Defaults to "\t.comm\t".
376
377     /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
378     /// argument that specifies the alignment of the declaration.
379     bool COMMDirectiveTakesAlignment;     // Defaults to true.
380     
381     /// HasDotTypeDotSizeDirective - True if the target has .type and .size
382     /// directives, this is true for most ELF targets.
383     bool HasDotTypeDotSizeDirective;      // Defaults to true.
384     
385     /// UsedDirective - This directive, if non-null, is used to declare a global
386     /// as being used somehow that the assembler can't see.  This prevents dead
387     /// code elimination on some targets.
388     const char *UsedDirective;            // Defaults to null.
389
390     /// WeakRefDirective - This directive, if non-null, is used to declare a
391     /// global as being a weak undefined symbol.
392     const char *WeakRefDirective;         // Defaults to null.
393     
394     /// WeakDefDirective - This directive, if non-null, is used to declare a
395     /// global as being a weak defined symbol.
396     const char *WeakDefDirective;         // Defaults to null.
397     
398     /// HiddenDirective - This directive, if non-null, is used to declare a
399     /// global or function as having hidden visibility.
400     const char *HiddenDirective;          // Defaults to "\t.hidden\t".
401
402     /// ProtectedDirective - This directive, if non-null, is used to declare a
403     /// global or function as having protected visibility.
404     const char *ProtectedDirective;       // Defaults to "\t.protected\t".
405
406     //===--- Dwarf Emission Directives -----------------------------------===//
407
408     /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
409     /// offsets for debug information. Defaults to false.
410     bool AbsoluteDebugSectionOffsets;
411
412     /// AbsoluteEHSectionOffsets - True if we should emit abolute section
413     /// offsets for EH information. Defaults to false.
414     bool AbsoluteEHSectionOffsets;
415
416     /// HasLEB128 - True if target asm supports leb128 directives.
417     ///
418     bool HasLEB128; // Defaults to false.
419     
420     /// hasDotLocAndDotFile - True if target asm supports .loc and .file
421     /// directives for emitting debugging information.
422     ///
423     bool HasDotLocAndDotFile; // Defaults to false.
424     
425     /// SupportsDebugInformation - True if target supports emission of debugging
426     /// information.
427     bool SupportsDebugInformation;
428         
429     /// SupportsExceptionHandling - True if target supports
430     /// exception handling.
431     ///
432     bool SupportsExceptionHandling; // Defaults to false.
433     
434     /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
435     ///
436     bool DwarfRequiresFrameSection; // Defaults to true.
437
438     /// GlobalEHDirective - This is the directive used to make exception frame
439     /// tables globally visible.
440     ///
441     const char *GlobalEHDirective;          // Defaults to NULL.
442
443     /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
444     /// handle a weak_definition of constant 0 for an omitted EH frame.
445     bool SupportsWeakOmittedEHFrame;  // Defaults to true.
446
447     /// DwarfSectionOffsetDirective - Special section offset directive.
448     const char* DwarfSectionOffsetDirective; // Defaults to NULL
449     
450     /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
451     ///
452     const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
453
454     /// DwarfInfoSection - Section directive for Dwarf info.
455     ///
456     const char *DwarfInfoSection; // Defaults to ".debug_info".
457
458     /// DwarfLineSection - Section directive for Dwarf info.
459     ///
460     const char *DwarfLineSection; // Defaults to ".debug_line".
461     
462     /// DwarfFrameSection - Section directive for Dwarf info.
463     ///
464     const char *DwarfFrameSection; // Defaults to ".debug_frame".
465     
466     /// DwarfPubNamesSection - Section directive for Dwarf info.
467     ///
468     const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
469     
470     /// DwarfPubTypesSection - Section directive for Dwarf info.
471     ///
472     const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
473     
474     /// DwarfStrSection - Section directive for Dwarf info.
475     ///
476     const char *DwarfStrSection; // Defaults to ".debug_str".
477
478     /// DwarfLocSection - Section directive for Dwarf info.
479     ///
480     const char *DwarfLocSection; // Defaults to ".debug_loc".
481
482     /// DwarfARangesSection - Section directive for Dwarf info.
483     ///
484     const char *DwarfARangesSection; // Defaults to ".debug_aranges".
485
486     /// DwarfRangesSection - Section directive for Dwarf info.
487     ///
488     const char *DwarfRangesSection; // Defaults to ".debug_ranges".
489
490     /// DwarfMacInfoSection - Section directive for Dwarf info.
491     ///
492     const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
493     
494     /// DwarfEHFrameSection - Section directive for Exception frames.
495     ///
496     const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
497     
498     /// DwarfExceptionSection - Section directive for Exception table.
499     ///
500     const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
501
502     //===--- CBE Asm Translation Table -----------------------------------===//
503
504     const char *const *AsmTransCBE; // Defaults to empty
505
506   public:
507     TargetAsmInfo();
508     virtual ~TargetAsmInfo();
509
510     const Section* getNamedSection(const char *Name,
511                                    unsigned Flags = SectionFlags::None) const;
512     const Section* getUnnamedSection(const char *Directive,
513                                      unsigned Flags = SectionFlags::None) const;
514
515     /// Measure the specified inline asm to determine an approximation of its
516     /// length.
517     virtual unsigned getInlineAsmLength(const char *Str) const;
518
519     /// ExpandInlineAsm - This hook allows the target to expand an inline asm
520     /// call to be explicit llvm code if it wants to.  This is useful for
521     /// turning simple inline asms into LLVM intrinsics, which gives the
522     /// compiler more information about the behavior of the code.
523     virtual bool ExpandInlineAsm(CallInst *CI) const {
524       return false;
525     }
526
527     /// PreferredEHDataFormat - This hook allows the target to select data
528     /// format used for encoding pointers in exception handling data. Reason is
529     /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
530     /// if the symbol can be relocated.
531     virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
532                                            bool Global) const;
533
534     /// SectionKindForGlobal - This hook allows the target to select proper
535     /// section kind used for global emission.
536     virtual SectionKind::Kind
537     SectionKindForGlobal(const GlobalValue *GV) const;
538
539
540     /// SectionFlagsForGlobal - This hook allows the target to select proper
541     /// section flags either for given global or for section.
542     virtual unsigned
543     SectionFlagsForGlobal(const GlobalValue *GV = NULL,
544                           const char* name = NULL) const;
545
546     /// SectionForGlobal - This hooks returns proper section name for given
547     /// global with all necessary flags and marks.
548     virtual std::string SectionForGlobal(const GlobalValue *GV) const;
549
550     // Helper methods for SectionForGlobal
551     virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
552                                                SectionKind::Kind kind) const;
553
554     virtual std::string PrintSectionFlags(unsigned flags) const { return ""; }
555
556     virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
557
558     virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
559
560     // Accessors.
561     //
562     const char *getTextSection() const {
563       return TextSection;
564     }
565     const Section *getTextSection_() const {
566       return TextSection_;
567     }
568     const char *getDataSection() const {
569       return DataSection;
570     }
571     const Section *getDataSection_() const {
572       return DataSection_;
573     }
574     const char *getBSSSection() const {
575       return BSSSection;
576     }
577     const Section *getBSSSection_() const {
578       return BSSSection_;
579     }
580     const char *getReadOnlySection() const {
581       return ReadOnlySection;
582     }
583     const Section *getReadOnlySection_() const {
584       return ReadOnlySection_;
585     }
586     const Section *getSmallDataSection() const {
587       return SmallDataSection;
588     }
589     const Section *getSmallBSSSection() const {
590       return SmallBSSSection;
591     }
592     const Section *getSmallRODataSection() const {
593       return SmallRODataSection;
594     }
595     const char *getTLSDataSection() const {
596       return TLSDataSection;
597     }
598     const Section *getTLSDataSection_() const {
599       return TLSDataSection_;
600     }
601     const char *getTLSBSSSection() const {
602       return TLSBSSSection;
603     }
604     const Section *getTLSBSSSection_() const {
605       return TLSBSSSection_;
606     }
607     const char *getZeroFillDirective() const {
608       return ZeroFillDirective;
609     }
610     const char *getNonexecutableStackDirective() const {
611       return NonexecutableStackDirective;
612     }
613     bool needsSet() const {
614       return NeedsSet;
615     }
616     const char *getPCSymbol() const {
617       return PCSymbol;
618     }
619     char getSeparatorChar() const {
620       return SeparatorChar;
621     }
622     const char *getCommentString() const {
623       return CommentString;
624     }
625     const char *getGlobalPrefix() const {
626       return GlobalPrefix;
627     }
628     const char *getPrivateGlobalPrefix() const {
629       return PrivateGlobalPrefix;
630     }
631     const char *getJumpTableSpecialLabelPrefix() const {
632       return JumpTableSpecialLabelPrefix;
633     }
634     const char *getGlobalVarAddrPrefix() const {
635       return GlobalVarAddrPrefix;
636     }
637     const char *getGlobalVarAddrSuffix() const {
638       return GlobalVarAddrSuffix;
639     }
640     const char *getFunctionAddrPrefix() const {
641       return FunctionAddrPrefix;
642     }
643     const char *getFunctionAddrSuffix() const {
644       return FunctionAddrSuffix;
645     }
646     const char *getPersonalityPrefix() const {
647       return PersonalityPrefix;
648     }
649     const char *getPersonalitySuffix() const {
650       return PersonalitySuffix;
651     }
652     bool getNeedsIndirectEncoding() const {
653       return NeedsIndirectEncoding;
654     }
655     const char *getInlineAsmStart() const {
656       return InlineAsmStart;
657     }
658     const char *getInlineAsmEnd() const {
659       return InlineAsmEnd;
660     }
661     unsigned getAssemblerDialect() const {
662       return AssemblerDialect;
663     }
664     const char *getStringConstantPrefix() const {
665       return StringConstantPrefix;
666     }
667     const char *getZeroDirective() const {
668       return ZeroDirective;
669     }
670     const char *getZeroDirectiveSuffix() const {
671       return ZeroDirectiveSuffix;
672     }
673     const char *getAsciiDirective() const {
674       return AsciiDirective;
675     }
676     const char *getAscizDirective() const {
677       return AscizDirective;
678     }
679     const char *getData8bitsDirective() const {
680       return Data8bitsDirective;
681     }
682     const char *getData16bitsDirective() const {
683       return Data16bitsDirective;
684     }
685     const char *getData32bitsDirective() const {
686       return Data32bitsDirective;
687     }
688     const char *getData64bitsDirective() const {
689       return Data64bitsDirective;
690     }
691     const char *getJumpTableDirective() const {
692       return JumpTableDirective;
693     }
694     const char *getAlignDirective() const {
695       return AlignDirective;
696     }
697     bool getAlignmentIsInBytes() const {
698       return AlignmentIsInBytes;
699     }
700     unsigned getTextAlignFillValue() const {
701       return TextAlignFillValue;
702     }
703     const char *getSwitchToSectionDirective() const {
704       return SwitchToSectionDirective;
705     }
706     const char *getTextSectionStartSuffix() const {
707       return TextSectionStartSuffix;
708     }
709     const char *getDataSectionStartSuffix() const {
710       return DataSectionStartSuffix;
711     }
712     const char *getSectionEndDirectiveSuffix() const {
713       return SectionEndDirectiveSuffix;
714     }
715     const char *getConstantPoolSection() const {
716       return ConstantPoolSection;
717     }
718     const char *getJumpTableDataSection() const {
719       return JumpTableDataSection;
720     }
721     const char *getCStringSection() const {
722       return CStringSection;
723     }
724     const Section *getCStringSection_() const {
725       return CStringSection_;
726     }
727     const char *getStaticCtorsSection() const {
728       return StaticCtorsSection;
729     }
730     const char *getStaticDtorsSection() const {
731       return StaticDtorsSection;
732     }
733     const char *getFourByteConstantSection() const {
734       return FourByteConstantSection;
735     }
736     const Section *getFourByteConstantSection_() const {
737       return FourByteConstantSection_;
738     }
739     const char *getEightByteConstantSection() const {
740       return EightByteConstantSection;
741     }
742     const Section *getEightByteConstantSection_() const {
743       return EightByteConstantSection_;
744     }
745     const char *getSixteenByteConstantSection() const {
746       return SixteenByteConstantSection;
747     }
748     const Section *getSixteenByteConstantSection_() const {
749       return SixteenByteConstantSection_;
750     }
751     const char *getGlobalDirective() const {
752       return GlobalDirective;
753     }
754     const char *getSetDirective() const {
755       return SetDirective;
756     }
757     const char *getLCOMMDirective() const {
758       return LCOMMDirective;
759     }
760     const char *getCOMMDirective() const {
761       return COMMDirective;
762     }
763     bool getCOMMDirectiveTakesAlignment() const {
764       return COMMDirectiveTakesAlignment;
765     }
766     bool hasDotTypeDotSizeDirective() const {
767       return HasDotTypeDotSizeDirective;
768     }
769     const char *getUsedDirective() const {
770       return UsedDirective;
771     }
772     const char *getWeakRefDirective() const {
773       return WeakRefDirective;
774     }
775     const char *getWeakDefDirective() const {
776       return WeakDefDirective;
777     }
778     const char *getHiddenDirective() const {
779       return HiddenDirective;
780     }
781     const char *getProtectedDirective() const {
782       return ProtectedDirective;
783     }
784     bool isAbsoluteDebugSectionOffsets() const {
785       return AbsoluteDebugSectionOffsets;
786     }
787     bool isAbsoluteEHSectionOffsets() const {
788       return AbsoluteEHSectionOffsets;
789     }
790     bool hasLEB128() const {
791       return HasLEB128;
792     }
793     bool hasDotLocAndDotFile() const {
794       return HasDotLocAndDotFile;
795     }
796     bool doesSupportDebugInformation() const {
797       return SupportsDebugInformation;
798     }
799     bool doesSupportExceptionHandling() const {
800       return SupportsExceptionHandling;
801     }
802     bool doesDwarfRequireFrameSection() const {
803       return DwarfRequiresFrameSection;
804     }
805     const char *getGlobalEHDirective() const {
806       return GlobalEHDirective;
807     }
808     bool getSupportsWeakOmittedEHFrame() const {
809       return SupportsWeakOmittedEHFrame;
810     }
811     const char *getDwarfSectionOffsetDirective() const {
812       return DwarfSectionOffsetDirective;
813     }
814     const char *getDwarfAbbrevSection() const {
815       return DwarfAbbrevSection;
816     }
817     const char *getDwarfInfoSection() const {
818       return DwarfInfoSection;
819     }
820     const char *getDwarfLineSection() const {
821       return DwarfLineSection;
822     }
823     const char *getDwarfFrameSection() const {
824       return DwarfFrameSection;
825     }
826     const char *getDwarfPubNamesSection() const {
827       return DwarfPubNamesSection;
828     }
829     const char *getDwarfPubTypesSection() const {
830       return DwarfPubTypesSection;
831     }
832     const char *getDwarfStrSection() const {
833       return DwarfStrSection;
834     }
835     const char *getDwarfLocSection() const {
836       return DwarfLocSection;
837     }
838     const char *getDwarfARangesSection() const {
839       return DwarfARangesSection;
840     }
841     const char *getDwarfRangesSection() const {
842       return DwarfRangesSection;
843     }
844     const char *getDwarfMacInfoSection() const {
845       return DwarfMacInfoSection;
846     }
847     const char *getDwarfEHFrameSection() const {
848       return DwarfEHFrameSection;
849     }
850     const char *getDwarfExceptionSection() const {
851       return DwarfExceptionSection;
852     }
853     const char *const *getAsmCBE() const {
854       return AsmTransCBE;
855     }
856   };
857 }
858
859 #endif
860