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