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