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