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
39 DataRel, ///< Contains data that has relocations
40 DataRelLocal, ///< Contains data that has only local relocations
42 ROData, ///< Readonly data section
43 DataRelRO, ///< Contains data that is otherwise readonly
44 DataRelROLocal, ///< Contains r/o data with only local relocations
45 RODataMergeStr, ///< Readonly data section (mergeable strings)
46 RODataMergeConst, ///< Readonly data section (mergeable constants)
47 SmallData, ///< Small data section
48 SmallBSS, ///< Small bss section
49 SmallROData, ///< Small readonly section
50 ThreadData, ///< Initialized TLS data objects
51 ThreadBSS ///< Uninitialized TLS data objects
54 static inline bool isReadOnly(Kind K) {
55 return (K == SectionKind::ROData ||
56 K == SectionKind::RODataMergeConst ||
57 K == SectionKind::RODataMergeStr ||
58 K == SectionKind::SmallROData);
61 static inline bool isBSS(Kind K) {
62 return (K == SectionKind::BSS ||
63 K == SectionKind::SmallBSS);
67 namespace SectionFlags {
68 const unsigned Invalid = -1U;
69 const unsigned None = 0;
70 const unsigned Code = 1 << 0; ///< Section contains code
71 const unsigned Writeable = 1 << 1; ///< Section is writeable
72 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
73 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
74 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
75 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
76 const unsigned Debug = 1 << 6; ///< Section contains debug data
77 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
78 const unsigned Small = 1 << 8; ///< Section is small
79 const unsigned TypeFlags = 0xFF;
80 // Some gap for future flags
81 const unsigned Named = 1 << 23; ///< Section is named
82 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
84 static inline unsigned getEntitySize(unsigned Flags) {
85 return (Flags >> 24) & 0xFF;
88 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
89 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
93 static inline unsigned getEmptyKey() { return Invalid; }
94 static inline unsigned getTombstoneKey() { return Invalid - 1; }
95 static unsigned getHashValue(const unsigned &Key) { return Key; }
96 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
97 static bool isPod() { return true; }
100 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
110 friend class TargetAsmInfo;
111 friend class StringMapEntry<Section>;
112 friend class StringMap<Section>;
116 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
120 bool isNamed() const { return Flags & SectionFlags::Named; }
121 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
123 const std::string& getName() const { return Name; }
124 unsigned getFlags() const { return Flags; }
127 /// TargetAsmInfo - This class is intended to be used as a base class for asm
128 /// properties and features specific to the target.
129 class TargetAsmInfo {
131 mutable StringMap<Section> Sections;
132 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
134 /// TM - The current TargetMachine.
135 const TargetMachine &TM;
137 //===------------------------------------------------------------------===//
138 // Properties to be set by the target writer, used to configure asm printer.
141 /// TextSection - Section directive for standard text.
143 const Section *TextSection; // Defaults to ".text".
145 /// DataSection - Section directive for standard data.
147 const Section *DataSection; // Defaults to ".data".
149 /// BSSSection - Section directive for uninitialized data. Null if this
150 /// target doesn't support a BSS section.
152 const char *BSSSection; // Default to ".bss".
153 const Section *BSSSection_;
155 /// ReadOnlySection - This is the directive that is emitted to switch to a
156 /// read-only section for constant data (e.g. data declared const,
158 const Section *ReadOnlySection; // Defaults to NULL
160 /// SmallDataSection - This is the directive that is emitted to switch to a
161 /// small data section.
163 const Section *SmallDataSection; // Defaults to NULL
165 /// SmallBSSSection - This is the directive that is emitted to switch to a
166 /// small bss section.
168 const Section *SmallBSSSection; // Defaults to NULL
170 /// SmallRODataSection - This is the directive that is emitted to switch to
171 /// a small read-only data section.
173 const Section *SmallRODataSection; // Defaults to NULL
175 /// TLSDataSection - Section directive for Thread Local data.
177 const Section *TLSDataSection; // Defaults to ".tdata".
179 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
180 /// Null if this target doesn't support a BSS section.
182 const Section *TLSBSSSection; // Defaults to ".tbss".
184 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
185 /// section on this target. Null if this target doesn't support zerofill.
186 const char *ZeroFillDirective; // Default is null.
188 /// NonexecutableStackDirective - Directive for declaring to the
189 /// linker and beyond that the emitted code does not require stack
190 /// memory to be executable.
191 const char *NonexecutableStackDirective; // Default is null.
193 /// NeedsSet - True if target asm treats expressions in data directives
194 /// as linktime-relocatable. For assembly-time computation, we need to
195 /// use a .set. Thus:
198 /// is computed at assembly time, while
200 /// is relocated if the relative locations of x and y change at linktime.
201 /// We want both these things in different places.
202 bool NeedsSet; // Defaults to false.
204 /// MaxInstLength - This is the maximum possible length of an instruction,
205 /// which is needed to compute the size of an inline asm.
206 unsigned MaxInstLength; // Defaults to 4.
208 /// PCSymbol - The symbol used to represent the current PC. Used in PC
209 /// relative expressions.
210 const char *PCSymbol; // Defaults to "$".
212 /// SeparatorChar - This character, if specified, is used to separate
213 /// instructions from each other when on the same line. This is used to
214 /// measure inline asm instructions.
215 char SeparatorChar; // Defaults to ';'
217 /// CommentColumn - This indicates the comment num (zero-based) at
218 /// which asm comments should be printed.
219 unsigned CommentColumn; // Defaults to 60
221 /// CommentString - This indicates the comment character used by the
223 const char *CommentString; // Defaults to "#"
225 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
226 /// onto all global symbols. This is often used for "_" or ".".
227 const char *GlobalPrefix; // Defaults to ""
229 /// PrivateGlobalPrefix - This prefix is used for globals like constant
230 /// pool entries that are completely private to the .s file and should not
231 /// have names in the .o file. This is often "." or "L".
232 const char *PrivateGlobalPrefix; // Defaults to "."
234 /// LessPrivateGlobalPrefix - This prefix is used for symbols that should
235 /// be passed through the assembler but be removed by the linker. This
236 /// is "l" on Darwin, currently used for some ObjC metadata.
237 const char *LessPrivateGlobalPrefix; // Defaults to ""
239 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
240 /// emitted before jump tables with the specified prefix.
241 const char *JumpTableSpecialLabelPrefix; // Default to null.
243 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
244 /// will enclose any GlobalVariable (that isn't a function)
246 const char *GlobalVarAddrPrefix; // Defaults to ""
247 const char *GlobalVarAddrSuffix; // Defaults to ""
249 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
250 /// will enclose any GlobalVariable that points to a function.
251 /// For example, this is used by the IA64 backend to materialize
252 /// function descriptors, by decorating the ".data8" object with the
253 /// @verbatim @fptr( ) @endverbatim
254 /// link-relocation operator.
256 const char *FunctionAddrPrefix; // Defaults to ""
257 const char *FunctionAddrSuffix; // Defaults to ""
259 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
260 /// enclose any personality function in the common frame section.
262 const char *PersonalityPrefix; // Defaults to ""
263 const char *PersonalitySuffix; // Defaults to ""
265 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
268 bool NeedsIndirectEncoding; // Defaults to false
270 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
271 /// emit before and after an inline assembly statement.
272 const char *InlineAsmStart; // Defaults to "#APP\n"
273 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
275 /// AssemblerDialect - Which dialect of an assembler variant to use.
276 unsigned AssemblerDialect; // Defaults to 0
278 /// AllowQuotesInName - This is true if the assembler allows for complex
279 /// symbol names to be surrounded in quotes. This defaults to false.
280 bool AllowQuotesInName;
282 //===--- Data Emission Directives -------------------------------------===//
284 /// ZeroDirective - this should be set to the directive used to get some
285 /// number of zero bytes emitted to the current section. Common cases are
286 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
287 /// Data*bitsDirective's will be used to emit zero bytes.
288 const char *ZeroDirective; // Defaults to "\t.zero\t"
289 const char *ZeroDirectiveSuffix; // Defaults to ""
291 /// AsciiDirective - This directive allows emission of an ascii string with
292 /// the standard C escape characters embedded into it.
293 const char *AsciiDirective; // Defaults to "\t.ascii\t"
295 /// AscizDirective - If not null, this allows for special handling of
296 /// zero terminated strings on this target. This is commonly supported as
297 /// ".asciz". If a target doesn't support this, it can be set to null.
298 const char *AscizDirective; // Defaults to "\t.asciz\t"
300 /// DataDirectives - These directives are used to output some unit of
301 /// integer data to the current section. If a data directive is set to
302 /// null, smaller data directives will be used to emit the large sizes.
303 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
304 const char *Data16bitsDirective; // Defaults to "\t.short\t"
305 const char *Data32bitsDirective; // Defaults to "\t.long\t"
306 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
308 /// getDataASDirective - Return the directive that should be used to emit
309 /// data of the specified size to the specified numeric address space.
310 virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
311 assert(AS != 0 && "Don't know the directives for default addr space");
315 //===--- Alignment Information ----------------------------------------===//
317 /// AlignDirective - The directive used to emit round up to an alignment
320 const char *AlignDirective; // Defaults to "\t.align\t"
322 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
323 /// emits ".align N" directives, where N is the number of bytes to align to.
324 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
326 bool AlignmentIsInBytes; // Defaults to true
328 /// TextAlignFillValue - If non-zero, this is used to fill the executable
329 /// space created as the result of a alignment directive.
330 unsigned TextAlignFillValue;
332 //===--- Section Switching Directives ---------------------------------===//
334 /// SwitchToSectionDirective - This is the directive used when we want to
335 /// emit a global to an arbitrary section. The section name is emited after
337 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
339 /// TextSectionStartSuffix - This is printed after each start of section
340 /// directive for text sections.
341 const char *TextSectionStartSuffix; // Defaults to "".
343 /// DataSectionStartSuffix - This is printed after each start of section
344 /// directive for data sections.
345 const char *DataSectionStartSuffix; // Defaults to "".
347 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
348 /// section with the section name and this suffix printed.
349 const char *SectionEndDirectiveSuffix;// Defaults to null.
351 /// ConstantPoolSection - This is the section that we SwitchToSection right
352 /// before emitting the constant pool for a function.
353 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
355 /// JumpTableDataSection - This is the section that we SwitchToSection right
356 /// before emitting the jump tables for a function when the relocation model
358 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
360 /// JumpTableDirective - if non-null, the directive to emit before a jump
362 const char *JumpTableDirective;
364 /// CStringSection - If not null, this allows for special handling of
365 /// cstring constants (null terminated string that does not contain any
366 /// other null bytes) on this target. This is commonly supported as
368 const char *CStringSection; // Defaults to NULL
369 const Section *CStringSection_;
371 /// StaticCtorsSection - This is the directive that is emitted to switch to
372 /// a section to emit the static constructor list.
373 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
374 const char *StaticCtorsSection;
376 /// StaticDtorsSection - This is the directive that is emitted to switch to
377 /// a section to emit the static destructor list.
378 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
379 const char *StaticDtorsSection;
381 //===--- Global Variable Emission Directives --------------------------===//
383 /// GlobalDirective - This is the directive used to declare a global entity.
385 const char *GlobalDirective; // Defaults to NULL.
387 /// ExternDirective - This is the directive used to declare external
390 const char *ExternDirective; // Defaults to NULL.
392 /// SetDirective - This is the name of a directive that can be used to tell
393 /// the assembler to set the value of a variable to some expression.
394 const char *SetDirective; // Defaults to null.
396 /// LCOMMDirective - This is the name of a directive (if supported) that can
397 /// be used to efficiently declare a local (internal) block of zero
398 /// initialized data in the .bss/.data section. The syntax expected is:
399 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
401 const char *LCOMMDirective; // Defaults to null.
403 const char *COMMDirective; // Defaults to "\t.comm\t".
405 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
406 /// argument that specifies the alignment of the declaration.
407 bool COMMDirectiveTakesAlignment; // Defaults to true.
409 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
410 /// directives, this is true for most ELF targets.
411 bool HasDotTypeDotSizeDirective; // Defaults to true.
413 /// HasSingleParameterDotFile - True if the target has a single parameter
414 /// .file directive, this is true for ELF targets.
415 bool HasSingleParameterDotFile; // Defaults to true.
417 /// UsedDirective - This directive, if non-null, is used to declare a global
418 /// as being used somehow that the assembler can't see. This prevents dead
419 /// code elimination on some targets.
420 const char *UsedDirective; // Defaults to null.
422 /// WeakRefDirective - This directive, if non-null, is used to declare a
423 /// global as being a weak undefined symbol.
424 const char *WeakRefDirective; // Defaults to null.
426 /// WeakDefDirective - This directive, if non-null, is used to declare a
427 /// global as being a weak defined symbol.
428 const char *WeakDefDirective; // Defaults to null.
430 /// HiddenDirective - This directive, if non-null, is used to declare a
431 /// global or function as having hidden visibility.
432 const char *HiddenDirective; // Defaults to "\t.hidden\t".
434 /// ProtectedDirective - This directive, if non-null, is used to declare a
435 /// global or function as having protected visibility.
436 const char *ProtectedDirective; // Defaults to "\t.protected\t".
438 //===--- Dwarf Emission Directives -----------------------------------===//
440 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
441 /// offsets for debug information. Defaults to false.
442 bool AbsoluteDebugSectionOffsets;
444 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
445 /// offsets for EH information. Defaults to false.
446 bool AbsoluteEHSectionOffsets;
448 /// HasLEB128 - True if target asm supports leb128 directives.
450 bool HasLEB128; // Defaults to false.
452 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
453 /// directives for emitting debugging information.
455 bool HasDotLocAndDotFile; // Defaults to false.
457 /// SupportsDebugInformation - True if target supports emission of debugging
459 bool SupportsDebugInformation;
461 /// SupportsExceptionHandling - True if target supports
462 /// exception handling.
464 bool SupportsExceptionHandling; // Defaults to false.
466 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
468 bool DwarfRequiresFrameSection; // Defaults to true.
470 /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
471 /// encode inline subroutine information.
472 bool DwarfUsesInlineInfoSection; // Defaults to false.
474 /// Is_EHSymbolPrivate - If set, the "_foo.eh" is made private so that it
475 /// doesn't show up in the symbol table of the object file.
476 bool Is_EHSymbolPrivate; // Defaults to true.
478 /// GlobalEHDirective - This is the directive used to make exception frame
479 /// tables globally visible.
481 const char *GlobalEHDirective; // Defaults to NULL.
483 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
484 /// handle a weak_definition of constant 0 for an omitted EH frame.
485 bool SupportsWeakOmittedEHFrame; // Defaults to true.
487 /// DwarfSectionOffsetDirective - Special section offset directive.
488 const char* DwarfSectionOffsetDirective; // Defaults to NULL
490 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
492 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
494 /// DwarfInfoSection - Section directive for Dwarf info.
496 const char *DwarfInfoSection; // Defaults to ".debug_info".
498 /// DwarfLineSection - Section directive for Dwarf info.
500 const char *DwarfLineSection; // Defaults to ".debug_line".
502 /// DwarfFrameSection - Section directive for Dwarf info.
504 const char *DwarfFrameSection; // Defaults to ".debug_frame".
506 /// DwarfPubNamesSection - Section directive for Dwarf info.
508 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
510 /// DwarfPubTypesSection - Section directive for Dwarf info.
512 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
514 /// DwarfDebugInlineSection - Section directive for inline info.
516 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
518 /// DwarfStrSection - Section directive for Dwarf info.
520 const char *DwarfStrSection; // Defaults to ".debug_str".
522 /// DwarfLocSection - Section directive for Dwarf info.
524 const char *DwarfLocSection; // Defaults to ".debug_loc".
526 /// DwarfARangesSection - Section directive for Dwarf info.
528 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
530 /// DwarfRangesSection - Section directive for Dwarf info.
532 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
534 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
536 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
538 /// DwarfEHFrameSection - Section directive for Exception frames.
540 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
542 /// DwarfExceptionSection - Section directive for Exception table.
544 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
546 //===--- CBE Asm Translation Table -----------------------------------===//
548 const char *const *AsmTransCBE; // Defaults to empty
551 explicit TargetAsmInfo(const TargetMachine &TM);
552 virtual ~TargetAsmInfo();
554 const Section* getNamedSection(const char *Name,
555 unsigned Flags = SectionFlags::None,
556 bool Override = false) const;
557 const Section* getUnnamedSection(const char *Directive,
558 unsigned Flags = SectionFlags::None,
559 bool Override = false) const;
561 /// Measure the specified inline asm to determine an approximation of its
563 virtual unsigned getInlineAsmLength(const char *Str) const;
565 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
566 /// not to emit the UsedDirective for some symbols in llvm.used.
567 // FIXME: REMOVE this (rdar://7071300)
568 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
569 Mangler *Mang) const {
573 /// PreferredEHDataFormat - This hook allows the target to select data
574 /// format used for encoding pointers in exception handling data. Reason is
575 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
576 /// if the symbol can be relocated.
577 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
580 /// SectionKindForGlobal - This hook allows the target to select proper
581 /// section kind used for global emission.
582 // FIXME: Eliminate this.
583 virtual SectionKind::Kind
584 SectionKindForGlobal(const GlobalValue *GV) const;
586 /// RelocBehaviour - Describes how relocations should be treated when
587 /// selecting sections. Reloc::Global bit should be set if global
588 /// relocations should force object to be placed in read-write
589 /// sections. Reloc::Local bit should be set if local relocations should
590 /// force object to be placed in read-write sections.
591 virtual unsigned RelocBehaviour() const;
593 /// SectionFlagsForGlobal - This hook allows the target to select proper
594 /// section flags either for given global or for section.
595 // FIXME: Eliminate this.
597 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
598 const char* name = NULL) const;
600 /// SectionForGlobal - This hooks returns proper section name for given
601 /// global with all necessary flags and marks.
602 // FIXME: Eliminate this.
603 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
605 // Helper methods for SectionForGlobal
606 // FIXME: Eliminate this.
607 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
608 SectionKind::Kind kind) const;
610 const std::string &getSectionFlags(unsigned Flags) const;
611 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
613 // FIXME: Eliminate this.
614 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
615 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
617 /// getSLEB128Size - Compute the number of bytes required for a signed
619 static unsigned getSLEB128Size(int Value);
621 /// getULEB128Size - Compute the number of bytes required for an unsigned
623 static unsigned getULEB128Size(unsigned Value);
625 // Data directive accessors.
627 const char *getData8bitsDirective(unsigned AS = 0) const {
628 return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
630 const char *getData16bitsDirective(unsigned AS = 0) const {
631 return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
633 const char *getData32bitsDirective(unsigned AS = 0) const {
634 return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
636 const char *getData64bitsDirective(unsigned AS = 0) const {
637 return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
643 const Section *getTextSection() const {
646 const Section *getDataSection() const {
649 const char *getBSSSection() const {
652 const Section *getBSSSection_() const {
655 const Section *getReadOnlySection() const {
656 return ReadOnlySection;
658 const Section *getSmallDataSection() const {
659 return SmallDataSection;
661 const Section *getSmallBSSSection() const {
662 return SmallBSSSection;
664 const Section *getSmallRODataSection() const {
665 return SmallRODataSection;
667 const Section *getTLSDataSection() const {
668 return TLSDataSection;
670 const Section *getTLSBSSSection() const {
671 return TLSBSSSection;
673 const char *getZeroFillDirective() const {
674 return ZeroFillDirective;
676 const char *getNonexecutableStackDirective() const {
677 return NonexecutableStackDirective;
679 bool needsSet() const {
682 const char *getPCSymbol() const {
685 char getSeparatorChar() const {
686 return SeparatorChar;
688 unsigned getCommentColumn() const {
689 return CommentColumn;
691 const char *getCommentString() const {
692 return CommentString;
694 const char *getGlobalPrefix() const {
697 const char *getPrivateGlobalPrefix() const {
698 return PrivateGlobalPrefix;
700 const char *getLessPrivateGlobalPrefix() const {
701 return LessPrivateGlobalPrefix;
703 const char *getJumpTableSpecialLabelPrefix() const {
704 return JumpTableSpecialLabelPrefix;
706 const char *getGlobalVarAddrPrefix() const {
707 return GlobalVarAddrPrefix;
709 const char *getGlobalVarAddrSuffix() const {
710 return GlobalVarAddrSuffix;
712 const char *getFunctionAddrPrefix() const {
713 return FunctionAddrPrefix;
715 const char *getFunctionAddrSuffix() const {
716 return FunctionAddrSuffix;
718 const char *getPersonalityPrefix() const {
719 return PersonalityPrefix;
721 const char *getPersonalitySuffix() const {
722 return PersonalitySuffix;
724 bool getNeedsIndirectEncoding() const {
725 return NeedsIndirectEncoding;
727 const char *getInlineAsmStart() const {
728 return InlineAsmStart;
730 const char *getInlineAsmEnd() const {
733 unsigned getAssemblerDialect() const {
734 return AssemblerDialect;
736 bool doesAllowQuotesInName() const {
737 return AllowQuotesInName;
739 const char *getZeroDirective() const {
740 return ZeroDirective;
742 const char *getZeroDirectiveSuffix() const {
743 return ZeroDirectiveSuffix;
745 const char *getAsciiDirective() const {
746 return AsciiDirective;
748 const char *getAscizDirective() const {
749 return AscizDirective;
751 const char *getJumpTableDirective() const {
752 return JumpTableDirective;
754 const char *getAlignDirective() const {
755 return AlignDirective;
757 bool getAlignmentIsInBytes() const {
758 return AlignmentIsInBytes;
760 unsigned getTextAlignFillValue() const {
761 return TextAlignFillValue;
763 const char *getSwitchToSectionDirective() const {
764 return SwitchToSectionDirective;
766 const char *getTextSectionStartSuffix() const {
767 return TextSectionStartSuffix;
769 const char *getDataSectionStartSuffix() const {
770 return DataSectionStartSuffix;
772 const char *getSectionEndDirectiveSuffix() const {
773 return SectionEndDirectiveSuffix;
775 const char *getConstantPoolSection() const {
776 return ConstantPoolSection;
778 const char *getJumpTableDataSection() const {
779 return JumpTableDataSection;
781 const char *getCStringSection() const {
782 return CStringSection;
784 const Section *getCStringSection_() const {
785 return CStringSection_;
787 const char *getStaticCtorsSection() const {
788 return StaticCtorsSection;
790 const char *getStaticDtorsSection() const {
791 return StaticDtorsSection;
793 const char *getGlobalDirective() const {
794 return GlobalDirective;
796 const char *getExternDirective() const {
797 return ExternDirective;
799 const char *getSetDirective() const {
802 const char *getLCOMMDirective() const {
803 return LCOMMDirective;
805 const char *getCOMMDirective() const {
806 return COMMDirective;
808 bool getCOMMDirectiveTakesAlignment() const {
809 return COMMDirectiveTakesAlignment;
811 bool hasDotTypeDotSizeDirective() const {
812 return HasDotTypeDotSizeDirective;
814 bool hasSingleParameterDotFile() const {
815 return HasSingleParameterDotFile;
817 const char *getUsedDirective() const {
818 return UsedDirective;
820 const char *getWeakRefDirective() const {
821 return WeakRefDirective;
823 const char *getWeakDefDirective() const {
824 return WeakDefDirective;
826 const char *getHiddenDirective() const {
827 return HiddenDirective;
829 const char *getProtectedDirective() const {
830 return ProtectedDirective;
832 bool isAbsoluteDebugSectionOffsets() const {
833 return AbsoluteDebugSectionOffsets;
835 bool isAbsoluteEHSectionOffsets() const {
836 return AbsoluteEHSectionOffsets;
838 bool hasLEB128() const {
841 bool hasDotLocAndDotFile() const {
842 return HasDotLocAndDotFile;
844 bool doesSupportDebugInformation() const {
845 return SupportsDebugInformation;
847 bool doesSupportExceptionHandling() const {
848 return SupportsExceptionHandling;
850 bool doesDwarfRequireFrameSection() const {
851 return DwarfRequiresFrameSection;
853 bool doesDwarfUsesInlineInfoSection() const {
854 return DwarfUsesInlineInfoSection;
856 bool is_EHSymbolPrivate() const {
857 return Is_EHSymbolPrivate;
859 const char *getGlobalEHDirective() const {
860 return GlobalEHDirective;
862 bool getSupportsWeakOmittedEHFrame() const {
863 return SupportsWeakOmittedEHFrame;
865 const char *getDwarfSectionOffsetDirective() const {
866 return DwarfSectionOffsetDirective;
868 const char *getDwarfAbbrevSection() const {
869 return DwarfAbbrevSection;
871 const char *getDwarfInfoSection() const {
872 return DwarfInfoSection;
874 const char *getDwarfLineSection() const {
875 return DwarfLineSection;
877 const char *getDwarfFrameSection() const {
878 return DwarfFrameSection;
880 const char *getDwarfPubNamesSection() const {
881 return DwarfPubNamesSection;
883 const char *getDwarfPubTypesSection() const {
884 return DwarfPubTypesSection;
886 const char *getDwarfDebugInlineSection() const {
887 return DwarfDebugInlineSection;
889 const char *getDwarfStrSection() const {
890 return DwarfStrSection;
892 const char *getDwarfLocSection() const {
893 return DwarfLocSection;
895 const char *getDwarfARangesSection() const {
896 return DwarfARangesSection;
898 const char *getDwarfRangesSection() const {
899 return DwarfRangesSection;
901 const char *getDwarfMacroInfoSection() const {
902 return DwarfMacroInfoSection;
904 const char *getDwarfEHFrameSection() const {
905 return DwarfEHFrameSection;
907 const char *getDwarfExceptionSection() const {
908 return DwarfExceptionSection;
910 const char *const *getAsmCBE() const {