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