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