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