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 /// ExpandInlineAsm - This hook allows the target to expand an inline asm
566 /// call to be explicit llvm code if it wants to. This is useful for
567 /// turning simple inline asms into LLVM intrinsics, which gives the
568 /// compiler more information about the behavior of the code.
569 virtual bool ExpandInlineAsm(CallInst *CI) const {
573 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
574 /// not to emit the UsedDirective for some symbols in llvm.used.
575 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
576 Mangler *Mang) const {
580 /// PreferredEHDataFormat - This hook allows the target to select data
581 /// format used for encoding pointers in exception handling data. Reason is
582 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
583 /// if the symbol can be relocated.
584 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
587 /// SectionKindForGlobal - This hook allows the target to select proper
588 /// section kind used for global emission.
589 virtual SectionKind::Kind
590 SectionKindForGlobal(const GlobalValue *GV) const;
592 /// RelocBehaviour - Describes how relocations should be treated when
593 /// selecting sections. Reloc::Global bit should be set if global
594 /// relocations should force object to be placed in read-write
595 /// sections. Reloc::Local bit should be set if local relocations should
596 /// force object to be placed in read-write sections.
597 virtual unsigned RelocBehaviour() const;
599 /// SectionFlagsForGlobal - This hook allows the target to select proper
600 /// section flags either for given global or for section.
602 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
603 const char* name = NULL) const;
605 /// SectionForGlobal - This hooks returns proper section name for given
606 /// global with all necessary flags and marks.
607 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
609 // Helper methods for SectionForGlobal
610 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
611 SectionKind::Kind kind) const;
613 const std::string& getSectionFlags(unsigned Flags) const;
614 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
616 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
618 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
620 /// getSLEB128Size - Compute the number of bytes required for a signed
623 static unsigned getSLEB128Size(int Value);
625 /// getULEB128Size - Compute the number of bytes required for an unsigned
628 static unsigned getULEB128Size(unsigned Value);
630 // Data directive accessors
632 const char *getData8bitsDirective(unsigned AS = 0) const {
633 return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
635 const char *getData16bitsDirective(unsigned AS = 0) const {
636 return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
638 const char *getData32bitsDirective(unsigned AS = 0) const {
639 return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
641 const char *getData64bitsDirective(unsigned AS = 0) const {
642 return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
648 const Section *getTextSection() const {
651 const Section *getDataSection() const {
654 const char *getBSSSection() const {
657 const Section *getBSSSection_() const {
660 const Section *getReadOnlySection() const {
661 return ReadOnlySection;
663 const Section *getSmallDataSection() const {
664 return SmallDataSection;
666 const Section *getSmallBSSSection() const {
667 return SmallBSSSection;
669 const Section *getSmallRODataSection() const {
670 return SmallRODataSection;
672 const Section *getTLSDataSection() const {
673 return TLSDataSection;
675 const Section *getTLSBSSSection() const {
676 return TLSBSSSection;
678 const char *getZeroFillDirective() const {
679 return ZeroFillDirective;
681 const char *getNonexecutableStackDirective() const {
682 return NonexecutableStackDirective;
684 bool needsSet() const {
687 const char *getPCSymbol() const {
690 char getSeparatorChar() const {
691 return SeparatorChar;
693 unsigned getCommentColumn() const {
694 return CommentColumn;
696 const char *getCommentString() const {
697 return CommentString;
699 const char *getGlobalPrefix() const {
702 const char *getPrivateGlobalPrefix() const {
703 return PrivateGlobalPrefix;
705 const char *getLessPrivateGlobalPrefix() const {
706 return LessPrivateGlobalPrefix;
708 const char *getJumpTableSpecialLabelPrefix() const {
709 return JumpTableSpecialLabelPrefix;
711 const char *getGlobalVarAddrPrefix() const {
712 return GlobalVarAddrPrefix;
714 const char *getGlobalVarAddrSuffix() const {
715 return GlobalVarAddrSuffix;
717 const char *getFunctionAddrPrefix() const {
718 return FunctionAddrPrefix;
720 const char *getFunctionAddrSuffix() const {
721 return FunctionAddrSuffix;
723 const char *getPersonalityPrefix() const {
724 return PersonalityPrefix;
726 const char *getPersonalitySuffix() const {
727 return PersonalitySuffix;
729 bool getNeedsIndirectEncoding() const {
730 return NeedsIndirectEncoding;
732 const char *getInlineAsmStart() const {
733 return InlineAsmStart;
735 const char *getInlineAsmEnd() const {
738 unsigned getAssemblerDialect() const {
739 return AssemblerDialect;
741 bool doesAllowQuotesInName() const {
742 return AllowQuotesInName;
744 const char *getZeroDirective() const {
745 return ZeroDirective;
747 const char *getZeroDirectiveSuffix() const {
748 return ZeroDirectiveSuffix;
750 const char *getAsciiDirective() const {
751 return AsciiDirective;
753 const char *getAscizDirective() const {
754 return AscizDirective;
756 const char *getJumpTableDirective() const {
757 return JumpTableDirective;
759 const char *getAlignDirective() const {
760 return AlignDirective;
762 bool getAlignmentIsInBytes() const {
763 return AlignmentIsInBytes;
765 unsigned getTextAlignFillValue() const {
766 return TextAlignFillValue;
768 const char *getSwitchToSectionDirective() const {
769 return SwitchToSectionDirective;
771 const char *getTextSectionStartSuffix() const {
772 return TextSectionStartSuffix;
774 const char *getDataSectionStartSuffix() const {
775 return DataSectionStartSuffix;
777 const char *getSectionEndDirectiveSuffix() const {
778 return SectionEndDirectiveSuffix;
780 const char *getConstantPoolSection() const {
781 return ConstantPoolSection;
783 const char *getJumpTableDataSection() const {
784 return JumpTableDataSection;
786 const char *getCStringSection() const {
787 return CStringSection;
789 const Section *getCStringSection_() const {
790 return CStringSection_;
792 const char *getStaticCtorsSection() const {
793 return StaticCtorsSection;
795 const char *getStaticDtorsSection() const {
796 return StaticDtorsSection;
798 const char *getGlobalDirective() const {
799 return GlobalDirective;
801 const char *getExternDirective() const {
802 return ExternDirective;
804 const char *getSetDirective() const {
807 const char *getLCOMMDirective() const {
808 return LCOMMDirective;
810 const char *getCOMMDirective() const {
811 return COMMDirective;
813 bool getCOMMDirectiveTakesAlignment() const {
814 return COMMDirectiveTakesAlignment;
816 bool hasDotTypeDotSizeDirective() const {
817 return HasDotTypeDotSizeDirective;
819 bool hasSingleParameterDotFile() const {
820 return HasSingleParameterDotFile;
822 const char *getUsedDirective() const {
823 return UsedDirective;
825 const char *getWeakRefDirective() const {
826 return WeakRefDirective;
828 const char *getWeakDefDirective() const {
829 return WeakDefDirective;
831 const char *getHiddenDirective() const {
832 return HiddenDirective;
834 const char *getProtectedDirective() const {
835 return ProtectedDirective;
837 bool isAbsoluteDebugSectionOffsets() const {
838 return AbsoluteDebugSectionOffsets;
840 bool isAbsoluteEHSectionOffsets() const {
841 return AbsoluteEHSectionOffsets;
843 bool hasLEB128() const {
846 bool hasDotLocAndDotFile() const {
847 return HasDotLocAndDotFile;
849 bool doesSupportDebugInformation() const {
850 return SupportsDebugInformation;
852 bool doesSupportExceptionHandling() const {
853 return SupportsExceptionHandling;
855 bool doesDwarfRequireFrameSection() const {
856 return DwarfRequiresFrameSection;
858 bool doesDwarfUsesInlineInfoSection() const {
859 return DwarfUsesInlineInfoSection;
861 bool is_EHSymbolPrivate() const {
862 return Is_EHSymbolPrivate;
864 const char *getGlobalEHDirective() const {
865 return GlobalEHDirective;
867 bool getSupportsWeakOmittedEHFrame() const {
868 return SupportsWeakOmittedEHFrame;
870 const char *getDwarfSectionOffsetDirective() const {
871 return DwarfSectionOffsetDirective;
873 const char *getDwarfAbbrevSection() const {
874 return DwarfAbbrevSection;
876 const char *getDwarfInfoSection() const {
877 return DwarfInfoSection;
879 const char *getDwarfLineSection() const {
880 return DwarfLineSection;
882 const char *getDwarfFrameSection() const {
883 return DwarfFrameSection;
885 const char *getDwarfPubNamesSection() const {
886 return DwarfPubNamesSection;
888 const char *getDwarfPubTypesSection() const {
889 return DwarfPubTypesSection;
891 const char *getDwarfDebugInlineSection() const {
892 return DwarfDebugInlineSection;
894 const char *getDwarfStrSection() const {
895 return DwarfStrSection;
897 const char *getDwarfLocSection() const {
898 return DwarfLocSection;
900 const char *getDwarfARangesSection() const {
901 return DwarfARangesSection;
903 const char *getDwarfRangesSection() const {
904 return DwarfRangesSection;
906 const char *getDwarfMacroInfoSection() const {
907 return DwarfMacroInfoSection;
909 const char *getDwarfEHFrameSection() const {
910 return DwarfEHFrameSection;
912 const char *getDwarfExceptionSection() const {
913 return DwarfExceptionSection;
915 const char *const *getAsmCBE() const {