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