1 //===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TARGET_ASM_INFO_H
17 #define LLVM_TARGET_ASM_INFO_H
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/StringMap.h"
21 #include "llvm/Support/DataTypes.h"
25 // DWARF encoding query type
26 namespace DwarfEncoding {
34 namespace SectionKind {
36 Unknown = 0, ///< Custom section
37 Text, ///< Text section
38 Data, ///< Data section
40 ROData, ///< Readonly data section
41 RODataMergeStr, ///< Readonly data section (mergeable strings)
42 RODataMergeConst, ///< Readonly data section (mergeable constants)
43 SmallData, ///< Small data section
44 SmallBSS, ///< Small bss section
45 SmallROData, ///< Small readonly section
46 ThreadData, ///< Initialized TLS data objects
47 ThreadBSS ///< Uninitialized TLS data objects
50 static inline bool isReadOnly(Kind K) {
51 return (K == SectionKind::ROData ||
52 K == SectionKind::RODataMergeConst ||
53 K == SectionKind::RODataMergeStr ||
54 K == SectionKind::SmallROData);
57 static inline bool isBSS(Kind K) {
58 return (K == SectionKind::BSS ||
59 K == SectionKind::SmallBSS);
63 namespace SectionFlags {
64 const unsigned Invalid = -1U;
65 const unsigned None = 0;
66 const unsigned Code = 1 << 0; ///< Section contains code
67 const unsigned Writeable = 1 << 1; ///< Section is writeable
68 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
69 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
70 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
71 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
72 const unsigned Debug = 1 << 6; ///< Section contains debug data
73 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
74 const unsigned Small = 1 << 8; ///< Section is small
75 const unsigned TypeFlags = 0xFF;
76 // Some gap for future flags
77 const unsigned Named = 1 << 23; ///< Section is named
78 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
80 static inline unsigned getEntitySize(unsigned Flags) {
81 return (Flags >> 24) & 0xFF;
84 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
85 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
89 static inline unsigned getEmptyKey() { return Invalid; }
90 static inline unsigned getTombstoneKey() { return Invalid - 1; }
91 static unsigned getHashValue(const unsigned &Key) { return Key; }
92 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
93 static bool isPod() { return true; }
96 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
106 friend class TargetAsmInfo;
107 friend class StringMapEntry<Section>;
112 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
114 bool isNamed() const { return Flags & SectionFlags::Named; }
115 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
117 const std::string& getName() const { return Name; }
118 unsigned getFlags() const { return Flags; }
121 /// TargetAsmInfo - This class is intended to be used as a base class for asm
122 /// properties and features specific to the target.
123 class TargetAsmInfo {
125 mutable StringMap<Section> Sections;
126 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
128 //===------------------------------------------------------------------===//
129 // Properties to be set by the target writer, used to configure asm printer.
132 /// TextSection - Section directive for standard text.
134 const char *TextSection; // Defaults to ".text".
135 const Section *TextSection_;
137 /// DataSection - Section directive for standard data.
139 const char *DataSection; // Defaults to ".data".
140 const Section *DataSection_;
142 /// BSSSection - Section directive for uninitialized data. Null if this
143 /// target doesn't support a BSS section.
145 const char *BSSSection; // Default to ".bss".
146 const Section *BSSSection_;
148 /// ReadOnlySection - This is the directive that is emitted to switch to a
149 /// read-only section for constant data (e.g. data declared const,
151 const char *ReadOnlySection; // Defaults to NULL
152 const Section *ReadOnlySection_;
154 /// SmallDataSection - This is the directive that is emitted to switch to a
155 /// small data section.
157 const Section *SmallDataSection; // Defaults to NULL
159 /// SmallBSSSection - This is the directive that is emitted to switch to a
160 /// small bss section.
162 const Section *SmallBSSSection; // Defaults to NULL
164 /// SmallRODataSection - This is the directive that is emitted to switch to
165 /// a small read-only data section.
167 const Section *SmallRODataSection; // Defaults to NULL
169 /// TLSDataSection - Section directive for Thread Local data.
171 const char *TLSDataSection;// Defaults to ".section .tdata,"awT",@progbits".
172 const Section *TLSDataSection_;
174 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
175 /// Null if this target doesn't support a BSS section.
177 const char *TLSBSSSection;// Default to ".section .tbss,"awT",@nobits".
178 const Section *TLSBSSSection_;
180 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
181 /// section on this target. Null if this target doesn't support zerofill.
182 const char *ZeroFillDirective; // Default is null.
184 /// NonexecutableStackDirective - Directive for declaring to the
185 /// linker and beyond that the emitted code does not require stack
186 /// memory to be executable.
187 const char *NonexecutableStackDirective; // Default is null.
189 /// NeedsSet - True if target asm treats expressions in data directives
190 /// as linktime-relocatable. For assembly-time computation, we need to
191 /// use a .set. Thus:
194 /// is computed at assembly time, while
196 /// is relocated if the relative locations of x and y change at linktime.
197 /// We want both these things in different places.
198 bool NeedsSet; // Defaults to false.
200 /// MaxInstLength - This is the maximum possible length of an instruction,
201 /// which is needed to compute the size of an inline asm.
202 unsigned MaxInstLength; // Defaults to 4.
204 /// PCSymbol - The symbol used to represent the current PC. Used in PC
205 /// relative expressions.
206 const char *PCSymbol; // Defaults to "$".
208 /// SeparatorChar - This character, if specified, is used to separate
209 /// instructions from each other when on the same line. This is used to
210 /// measure inline asm instructions.
211 char SeparatorChar; // Defaults to ';'
213 /// CommentString - This indicates the comment character used by the
215 const char *CommentString; // Defaults to "#"
217 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
218 /// onto all global symbols. This is often used for "_" or ".".
219 const char *GlobalPrefix; // Defaults to ""
221 /// PrivateGlobalPrefix - This prefix is used for globals like constant
222 /// pool entries that are completely private to the .s file and should not
223 /// have names in the .o file. This is often "." or "L".
224 const char *PrivateGlobalPrefix; // Defaults to "."
226 /// LessPrivateGlobalPrefix - This prefix is used for symbols that should
227 /// be passed through the assembler but be removed by the linker. This
228 /// is "l" on Darwin, currently used for some ObjC metadata.
229 const char *LessPrivateGlobalPrefix; // Defaults to ""
231 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
232 /// emitted before jump tables with the specified prefix.
233 const char *JumpTableSpecialLabelPrefix; // Default to null.
235 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
236 /// will enclose any GlobalVariable (that isn't a function)
238 const char *GlobalVarAddrPrefix; // Defaults to ""
239 const char *GlobalVarAddrSuffix; // Defaults to ""
241 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
242 /// will enclose any GlobalVariable that points to a function.
243 /// For example, this is used by the IA64 backend to materialize
244 /// function descriptors, by decorating the ".data8" object with the
245 /// @verbatim @fptr( ) @endverbatim
246 /// link-relocation operator.
248 const char *FunctionAddrPrefix; // Defaults to ""
249 const char *FunctionAddrSuffix; // Defaults to ""
251 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
252 /// enclose any personality function in the common frame section.
254 const char *PersonalityPrefix; // Defaults to ""
255 const char *PersonalitySuffix; // Defaults to ""
257 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
260 bool NeedsIndirectEncoding; // Defaults to false
262 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
263 /// emit before and after an inline assembly statement.
264 const char *InlineAsmStart; // Defaults to "#APP\n"
265 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
267 /// AssemblerDialect - Which dialect of an assembler variant to use.
268 unsigned AssemblerDialect; // Defaults to 0
270 /// StringConstantPrefix - Prefix for FEs to use when generating unnamed
271 /// constant strings. These names get run through the Mangler later; if
272 /// you want the Mangler not to add the GlobalPrefix as well,
273 /// use '\1' as the first character.
274 const char *StringConstantPrefix; // Defaults to ".str"
276 //===--- Data Emission Directives -------------------------------------===//
278 /// ZeroDirective - this should be set to the directive used to get some
279 /// number of zero bytes emitted to the current section. Common cases are
280 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
281 /// Data*bitsDirective's will be used to emit zero bytes.
282 const char *ZeroDirective; // Defaults to "\t.zero\t"
283 const char *ZeroDirectiveSuffix; // Defaults to ""
285 /// AsciiDirective - This directive allows emission of an ascii string with
286 /// the standard C escape characters embedded into it.
287 const char *AsciiDirective; // Defaults to "\t.ascii\t"
289 /// AscizDirective - If not null, this allows for special handling of
290 /// zero terminated strings on this target. This is commonly supported as
291 /// ".asciz". If a target doesn't support this, it can be set to null.
292 const char *AscizDirective; // Defaults to "\t.asciz\t"
294 /// DataDirectives - These directives are used to output some unit of
295 /// integer data to the current section. If a data directive is set to
296 /// null, smaller data directives will be used to emit the large sizes.
297 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
298 const char *Data16bitsDirective; // Defaults to "\t.short\t"
299 const char *Data32bitsDirective; // Defaults to "\t.long\t"
300 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
302 //===--- Alignment Information ----------------------------------------===//
304 /// AlignDirective - The directive used to emit round up to an alignment
307 const char *AlignDirective; // Defaults to "\t.align\t"
309 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
310 /// emits ".align N" directives, where N is the number of bytes to align to.
311 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
313 bool AlignmentIsInBytes; // Defaults to true
315 /// TextAlignFillValue - If non-zero, this is used to fill the executable
316 /// space created as the result of a alignment directive.
317 unsigned TextAlignFillValue;
319 //===--- Section Switching Directives ---------------------------------===//
321 /// SwitchToSectionDirective - This is the directive used when we want to
322 /// emit a global to an arbitrary section. The section name is emited after
324 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
326 /// TextSectionStartSuffix - This is printed after each start of section
327 /// directive for text sections.
328 const char *TextSectionStartSuffix; // Defaults to "".
330 /// DataSectionStartSuffix - This is printed after each start of section
331 /// directive for data sections.
332 const char *DataSectionStartSuffix; // Defaults to "".
334 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
335 /// section with the section name and this suffix printed.
336 const char *SectionEndDirectiveSuffix;// Defaults to null.
338 /// ConstantPoolSection - This is the section that we SwitchToSection right
339 /// before emitting the constant pool for a function.
340 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
342 /// JumpTableDataSection - This is the section that we SwitchToSection right
343 /// before emitting the jump tables for a function when the relocation model
345 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
347 /// JumpTableDirective - if non-null, the directive to emit before a jump
349 const char *JumpTableDirective;
351 /// CStringSection - If not null, this allows for special handling of
352 /// cstring constants (null terminated string that does not contain any
353 /// other null bytes) on this target. This is commonly supported as
355 const char *CStringSection; // Defaults to NULL
356 const Section *CStringSection_;
358 /// StaticCtorsSection - This is the directive that is emitted to switch to
359 /// a section to emit the static constructor list.
360 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
361 const char *StaticCtorsSection;
363 /// StaticDtorsSection - This is the directive that is emitted to switch to
364 /// a section to emit the static destructor list.
365 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
366 const char *StaticDtorsSection;
368 /// FourByteConstantSection, EightByteConstantSection,
369 /// SixteenByteConstantSection - These are special sections where we place
370 /// 4-, 8-, and 16- byte constant literals.
371 const char *FourByteConstantSection;
372 const Section *FourByteConstantSection_;
373 const char *EightByteConstantSection;
374 const Section *EightByteConstantSection_;
375 const char *SixteenByteConstantSection;
376 const Section *SixteenByteConstantSection_;
378 //===--- Global Variable Emission Directives --------------------------===//
380 /// GlobalDirective - This is the directive used to declare a global entity.
382 const char *GlobalDirective; // Defaults to NULL.
384 /// SetDirective - This is the name of a directive that can be used to tell
385 /// the assembler to set the value of a variable to some expression.
386 const char *SetDirective; // Defaults to null.
388 /// LCOMMDirective - This is the name of a directive (if supported) that can
389 /// be used to efficiently declare a local (internal) block of zero
390 /// initialized data in the .bss/.data section. The syntax expected is:
391 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
393 const char *LCOMMDirective; // Defaults to null.
395 const char *COMMDirective; // Defaults to "\t.comm\t".
397 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
398 /// argument that specifies the alignment of the declaration.
399 bool COMMDirectiveTakesAlignment; // Defaults to true.
401 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
402 /// directives, this is true for most ELF targets.
403 bool HasDotTypeDotSizeDirective; // Defaults to true.
405 /// UsedDirective - This directive, if non-null, is used to declare a global
406 /// as being used somehow that the assembler can't see. This prevents dead
407 /// code elimination on some targets.
408 const char *UsedDirective; // Defaults to null.
410 /// WeakRefDirective - This directive, if non-null, is used to declare a
411 /// global as being a weak undefined symbol.
412 const char *WeakRefDirective; // Defaults to null.
414 /// WeakDefDirective - This directive, if non-null, is used to declare a
415 /// global as being a weak defined symbol.
416 const char *WeakDefDirective; // Defaults to null.
418 /// HiddenDirective - This directive, if non-null, is used to declare a
419 /// global or function as having hidden visibility.
420 const char *HiddenDirective; // Defaults to "\t.hidden\t".
422 /// ProtectedDirective - This directive, if non-null, is used to declare a
423 /// global or function as having protected visibility.
424 const char *ProtectedDirective; // Defaults to "\t.protected\t".
426 //===--- Dwarf Emission Directives -----------------------------------===//
428 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
429 /// offsets for debug information. Defaults to false.
430 bool AbsoluteDebugSectionOffsets;
432 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
433 /// offsets for EH information. Defaults to false.
434 bool AbsoluteEHSectionOffsets;
436 /// HasLEB128 - True if target asm supports leb128 directives.
438 bool HasLEB128; // Defaults to false.
440 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
441 /// directives for emitting debugging information.
443 bool HasDotLocAndDotFile; // Defaults to false.
445 /// SupportsDebugInformation - True if target supports emission of debugging
447 bool SupportsDebugInformation;
449 /// SupportsExceptionHandling - True if target supports
450 /// exception handling.
452 bool SupportsExceptionHandling; // Defaults to false.
454 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
456 bool DwarfRequiresFrameSection; // Defaults to true.
458 /// GlobalEHDirective - This is the directive used to make exception frame
459 /// tables globally visible.
461 const char *GlobalEHDirective; // Defaults to NULL.
463 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
464 /// handle a weak_definition of constant 0 for an omitted EH frame.
465 bool SupportsWeakOmittedEHFrame; // Defaults to true.
467 /// DwarfSectionOffsetDirective - Special section offset directive.
468 const char* DwarfSectionOffsetDirective; // Defaults to NULL
470 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
472 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
474 /// DwarfInfoSection - Section directive for Dwarf info.
476 const char *DwarfInfoSection; // Defaults to ".debug_info".
478 /// DwarfLineSection - Section directive for Dwarf info.
480 const char *DwarfLineSection; // Defaults to ".debug_line".
482 /// DwarfFrameSection - Section directive for Dwarf info.
484 const char *DwarfFrameSection; // Defaults to ".debug_frame".
486 /// DwarfPubNamesSection - Section directive for Dwarf info.
488 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
490 /// DwarfPubTypesSection - Section directive for Dwarf info.
492 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
494 /// DwarfStrSection - Section directive for Dwarf info.
496 const char *DwarfStrSection; // Defaults to ".debug_str".
498 /// DwarfLocSection - Section directive for Dwarf info.
500 const char *DwarfLocSection; // Defaults to ".debug_loc".
502 /// DwarfARangesSection - Section directive for Dwarf info.
504 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
506 /// DwarfRangesSection - Section directive for Dwarf info.
508 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
510 /// DwarfMacInfoSection - Section directive for Dwarf info.
512 const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
514 /// DwarfEHFrameSection - Section directive for Exception frames.
516 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
518 /// DwarfExceptionSection - Section directive for Exception table.
520 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
522 //===--- CBE Asm Translation Table -----------------------------------===//
524 const char *const *AsmTransCBE; // Defaults to empty
528 virtual ~TargetAsmInfo();
530 const Section* getNamedSection(const char *Name,
531 unsigned Flags = SectionFlags::None,
532 bool Override = false) const;
533 const Section* getUnnamedSection(const char *Directive,
534 unsigned Flags = SectionFlags::None,
535 bool Override = false) const;
537 /// Measure the specified inline asm to determine an approximation of its
539 virtual unsigned getInlineAsmLength(const char *Str) const;
541 /// ExpandInlineAsm - This hook allows the target to expand an inline asm
542 /// call to be explicit llvm code if it wants to. This is useful for
543 /// turning simple inline asms into LLVM intrinsics, which gives the
544 /// compiler more information about the behavior of the code.
545 virtual bool ExpandInlineAsm(CallInst *CI) const {
549 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
550 /// not to emit the UsedDirective for some symbols in llvm.used.
551 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
552 Mangler *Mang) const {
556 /// PreferredEHDataFormat - This hook allows the target to select data
557 /// format used for encoding pointers in exception handling data. Reason is
558 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
559 /// if the symbol can be relocated.
560 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
563 /// SectionKindForGlobal - This hook allows the target to select proper
564 /// section kind used for global emission.
565 virtual SectionKind::Kind
566 SectionKindForGlobal(const GlobalValue *GV) const;
569 /// SectionFlagsForGlobal - This hook allows the target to select proper
570 /// section flags either for given global or for section.
572 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
573 const char* name = NULL) const;
575 /// SectionForGlobal - This hooks returns proper section name for given
576 /// global with all necessary flags and marks.
577 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
579 // Helper methods for SectionForGlobal
580 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
581 SectionKind::Kind kind) const;
583 const std::string& getSectionFlags(unsigned Flags) const;
584 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
586 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
588 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
590 /// getSLEB128Size - Compute the number of bytes required for a signed
593 static unsigned getSLEB128Size(int Value);
595 /// getULEB128Size - Compute the number of bytes required for an unsigned
598 static unsigned getULEB128Size(unsigned Value);
602 const char *getTextSection() const {
605 const Section *getTextSection_() const {
608 const char *getDataSection() const {
611 const Section *getDataSection_() const {
614 const char *getBSSSection() const {
617 const Section *getBSSSection_() const {
620 const char *getReadOnlySection() const {
621 return ReadOnlySection;
623 const Section *getReadOnlySection_() const {
624 return ReadOnlySection_;
626 const Section *getSmallDataSection() const {
627 return SmallDataSection;
629 const Section *getSmallBSSSection() const {
630 return SmallBSSSection;
632 const Section *getSmallRODataSection() const {
633 return SmallRODataSection;
635 const char *getTLSDataSection() const {
636 return TLSDataSection;
638 const Section *getTLSDataSection_() const {
639 return TLSDataSection_;
641 const char *getTLSBSSSection() const {
642 return TLSBSSSection;
644 const Section *getTLSBSSSection_() const {
645 return TLSBSSSection_;
647 const char *getZeroFillDirective() const {
648 return ZeroFillDirective;
650 const char *getNonexecutableStackDirective() const {
651 return NonexecutableStackDirective;
653 bool needsSet() const {
656 const char *getPCSymbol() const {
659 char getSeparatorChar() const {
660 return SeparatorChar;
662 const char *getCommentString() const {
663 return CommentString;
665 const char *getGlobalPrefix() const {
668 const char *getPrivateGlobalPrefix() const {
669 return PrivateGlobalPrefix;
671 const char *getLessPrivateGlobalPrefix() const {
672 return LessPrivateGlobalPrefix;
674 const char *getJumpTableSpecialLabelPrefix() const {
675 return JumpTableSpecialLabelPrefix;
677 const char *getGlobalVarAddrPrefix() const {
678 return GlobalVarAddrPrefix;
680 const char *getGlobalVarAddrSuffix() const {
681 return GlobalVarAddrSuffix;
683 const char *getFunctionAddrPrefix() const {
684 return FunctionAddrPrefix;
686 const char *getFunctionAddrSuffix() const {
687 return FunctionAddrSuffix;
689 const char *getPersonalityPrefix() const {
690 return PersonalityPrefix;
692 const char *getPersonalitySuffix() const {
693 return PersonalitySuffix;
695 bool getNeedsIndirectEncoding() const {
696 return NeedsIndirectEncoding;
698 const char *getInlineAsmStart() const {
699 return InlineAsmStart;
701 const char *getInlineAsmEnd() const {
704 unsigned getAssemblerDialect() const {
705 return AssemblerDialect;
707 const char *getStringConstantPrefix() const {
708 return StringConstantPrefix;
710 const char *getZeroDirective() const {
711 return ZeroDirective;
713 const char *getZeroDirectiveSuffix() const {
714 return ZeroDirectiveSuffix;
716 const char *getAsciiDirective() const {
717 return AsciiDirective;
719 const char *getAscizDirective() const {
720 return AscizDirective;
722 const char *getData8bitsDirective() const {
723 return Data8bitsDirective;
725 const char *getData16bitsDirective() const {
726 return Data16bitsDirective;
728 const char *getData32bitsDirective() const {
729 return Data32bitsDirective;
731 const char *getData64bitsDirective() const {
732 return Data64bitsDirective;
734 const char *getJumpTableDirective() const {
735 return JumpTableDirective;
737 const char *getAlignDirective() const {
738 return AlignDirective;
740 bool getAlignmentIsInBytes() const {
741 return AlignmentIsInBytes;
743 unsigned getTextAlignFillValue() const {
744 return TextAlignFillValue;
746 const char *getSwitchToSectionDirective() const {
747 return SwitchToSectionDirective;
749 const char *getTextSectionStartSuffix() const {
750 return TextSectionStartSuffix;
752 const char *getDataSectionStartSuffix() const {
753 return DataSectionStartSuffix;
755 const char *getSectionEndDirectiveSuffix() const {
756 return SectionEndDirectiveSuffix;
758 const char *getConstantPoolSection() const {
759 return ConstantPoolSection;
761 const char *getJumpTableDataSection() const {
762 return JumpTableDataSection;
764 const char *getCStringSection() const {
765 return CStringSection;
767 const Section *getCStringSection_() const {
768 return CStringSection_;
770 const char *getStaticCtorsSection() const {
771 return StaticCtorsSection;
773 const char *getStaticDtorsSection() const {
774 return StaticDtorsSection;
776 const char *getFourByteConstantSection() const {
777 return FourByteConstantSection;
779 const Section *getFourByteConstantSection_() const {
780 return FourByteConstantSection_;
782 const char *getEightByteConstantSection() const {
783 return EightByteConstantSection;
785 const Section *getEightByteConstantSection_() const {
786 return EightByteConstantSection_;
788 const char *getSixteenByteConstantSection() const {
789 return SixteenByteConstantSection;
791 const Section *getSixteenByteConstantSection_() const {
792 return SixteenByteConstantSection_;
794 const char *getGlobalDirective() const {
795 return GlobalDirective;
797 const char *getSetDirective() const {
800 const char *getLCOMMDirective() const {
801 return LCOMMDirective;
803 const char *getCOMMDirective() const {
804 return COMMDirective;
806 bool getCOMMDirectiveTakesAlignment() const {
807 return COMMDirectiveTakesAlignment;
809 bool hasDotTypeDotSizeDirective() const {
810 return HasDotTypeDotSizeDirective;
812 const char *getUsedDirective() const {
813 return UsedDirective;
815 const char *getWeakRefDirective() const {
816 return WeakRefDirective;
818 const char *getWeakDefDirective() const {
819 return WeakDefDirective;
821 const char *getHiddenDirective() const {
822 return HiddenDirective;
824 const char *getProtectedDirective() const {
825 return ProtectedDirective;
827 bool isAbsoluteDebugSectionOffsets() const {
828 return AbsoluteDebugSectionOffsets;
830 bool isAbsoluteEHSectionOffsets() const {
831 return AbsoluteEHSectionOffsets;
833 bool hasLEB128() const {
836 bool hasDotLocAndDotFile() const {
837 return HasDotLocAndDotFile;
839 bool doesSupportDebugInformation() const {
840 return SupportsDebugInformation;
842 bool doesSupportExceptionHandling() const {
843 return SupportsExceptionHandling;
845 bool doesDwarfRequireFrameSection() const {
846 return DwarfRequiresFrameSection;
848 const char *getGlobalEHDirective() const {
849 return GlobalEHDirective;
851 bool getSupportsWeakOmittedEHFrame() const {
852 return SupportsWeakOmittedEHFrame;
854 const char *getDwarfSectionOffsetDirective() const {
855 return DwarfSectionOffsetDirective;
857 const char *getDwarfAbbrevSection() const {
858 return DwarfAbbrevSection;
860 const char *getDwarfInfoSection() const {
861 return DwarfInfoSection;
863 const char *getDwarfLineSection() const {
864 return DwarfLineSection;
866 const char *getDwarfFrameSection() const {
867 return DwarfFrameSection;
869 const char *getDwarfPubNamesSection() const {
870 return DwarfPubNamesSection;
872 const char *getDwarfPubTypesSection() const {
873 return DwarfPubTypesSection;
875 const char *getDwarfStrSection() const {
876 return DwarfStrSection;
878 const char *getDwarfLocSection() const {
879 return DwarfLocSection;
881 const char *getDwarfARangesSection() const {
882 return DwarfARangesSection;
884 const char *getDwarfRangesSection() const {
885 return DwarfRangesSection;
887 const char *getDwarfMacInfoSection() const {
888 return DwarfMacInfoSection;
890 const char *getDwarfEHFrameSection() const {
891 return DwarfEHFrameSection;
893 const char *getDwarfExceptionSection() const {
894 return DwarfExceptionSection;
896 const char *const *getAsmCBE() const {