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 BSS, ///< BSS section.
40 Data, ///< Data section.
41 DataRel, ///< Data that has relocations.
42 DataRelLocal, ///< Data that only has local relocations.
45 ROData, ///< Readonly data section.
46 DataRelRO, ///< Readonly data with non-local relocations.
47 DataRelROLocal, ///< Readonly data with local relocations only.
49 /// Mergable sections.
50 RODataMergeStr, ///< Readonly data section: nul-terminated strings.
51 RODataMergeConst, ///< Readonly data section: fixed-length constants.
53 /// Thread local data.
54 ThreadData, ///< Initialized TLS data objects
55 ThreadBSS ///< Uninitialized TLS data objects
58 static inline bool isReadOnly(Kind K) {
59 return (K == SectionKind::ROData ||
60 K == SectionKind::RODataMergeConst ||
61 K == SectionKind::RODataMergeStr);
64 static inline bool isBSS(Kind K) {
65 return K == SectionKind::BSS;
69 namespace SectionFlags {
70 const unsigned Invalid = -1U;
71 const unsigned None = 0;
72 const unsigned Code = 1 << 0; ///< Section contains code
73 const unsigned Writeable = 1 << 1; ///< Section is writeable
74 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
75 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
76 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
77 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
78 const unsigned Debug = 1 << 6; ///< Section contains debug data
79 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
80 const unsigned TypeFlags = 0xFF;
81 // Some gap for future flags
82 const unsigned Named = 1 << 23; ///< Section is named
83 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
85 static inline unsigned getEntitySize(unsigned Flags) {
86 return (Flags >> 24) & 0xFF;
89 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
90 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
94 static inline unsigned getEmptyKey() { return Invalid; }
95 static inline unsigned getTombstoneKey() { return Invalid - 1; }
96 static unsigned getHashValue(const unsigned &Key) { return Key; }
97 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
98 static bool isPod() { return true; }
101 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
111 friend class TargetAsmInfo;
112 friend class StringMapEntry<Section>;
113 friend class StringMap<Section>;
117 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
121 bool isNamed() const { return Flags & SectionFlags::Named; }
122 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
124 const std::string& getName() const { return Name; }
125 unsigned getFlags() const { return Flags; }
127 bool hasFlag(unsigned F) const { return (Flags & F) != 0; }
130 /// TargetAsmInfo - This class is intended to be used as a base class for asm
131 /// properties and features specific to the target.
132 class TargetAsmInfo {
134 mutable StringMap<Section> Sections;
135 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
137 /// TM - The current TargetMachine.
138 const TargetMachine &TM;
140 //===------------------------------------------------------------------===//
141 // Properties to be set by the target writer, used to configure asm printer.
144 /// TextSection - Section directive for standard text.
146 const Section *TextSection; // Defaults to ".text".
148 /// DataSection - Section directive for standard data.
150 const Section *DataSection; // Defaults to ".data".
152 /// BSSSection - Section directive for uninitialized data. Null if this
153 /// target doesn't support a BSS section.
155 const char *BSSSection; // Default to ".bss".
156 const Section *BSSSection_;
158 /// ReadOnlySection - This is the directive that is emitted to switch to a
159 /// read-only section for constant data (e.g. data declared const,
161 const Section *ReadOnlySection; // Defaults to NULL
163 /// TLSDataSection - Section directive for Thread Local data.
165 const Section *TLSDataSection; // Defaults to ".tdata".
167 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
168 /// Null if this target doesn't support a BSS section.
170 const Section *TLSBSSSection; // Defaults to ".tbss".
172 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
173 /// section on this target. Null if this target doesn't support zerofill.
174 const char *ZeroFillDirective; // Default is null.
176 /// NonexecutableStackDirective - Directive for declaring to the
177 /// linker and beyond that the emitted code does not require stack
178 /// memory to be executable.
179 const char *NonexecutableStackDirective; // Default is null.
181 /// NeedsSet - True if target asm treats expressions in data directives
182 /// as linktime-relocatable. For assembly-time computation, we need to
183 /// use a .set. Thus:
186 /// is computed at assembly time, while
188 /// is relocated if the relative locations of x and y change at linktime.
189 /// We want both these things in different places.
190 bool NeedsSet; // Defaults to false.
192 /// MaxInstLength - This is the maximum possible length of an instruction,
193 /// which is needed to compute the size of an inline asm.
194 unsigned MaxInstLength; // Defaults to 4.
196 /// PCSymbol - The symbol used to represent the current PC. Used in PC
197 /// relative expressions.
198 const char *PCSymbol; // Defaults to "$".
200 /// SeparatorChar - This character, if specified, is used to separate
201 /// instructions from each other when on the same line. This is used to
202 /// measure inline asm instructions.
203 char SeparatorChar; // Defaults to ';'
205 /// CommentColumn - This indicates the comment num (zero-based) at
206 /// which asm comments should be printed.
207 unsigned CommentColumn; // Defaults to 60
209 /// CommentString - This indicates the comment character used by the
211 const char *CommentString; // Defaults to "#"
213 /// FirstOperandColumn - The output column where the first operand
214 /// should be printed
215 unsigned FirstOperandColumn; // Defaults to 0 (ignored)
217 /// MaxOperandLength - The maximum length of any printed asm
219 unsigned MaxOperandLength; // Defaults to 0 (ignored)
221 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
222 /// onto all global symbols. This is often used for "_" or ".".
223 const char *GlobalPrefix; // Defaults to ""
225 /// PrivateGlobalPrefix - This prefix is used for globals like constant
226 /// pool entries that are completely private to the .s file and should not
227 /// have names in the .o file. This is often "." or "L".
228 const char *PrivateGlobalPrefix; // Defaults to "."
230 /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
231 /// be passed through the assembler but be removed by the linker. This
232 /// is "l" on Darwin, currently used for some ObjC metadata.
233 const char *LinkerPrivateGlobalPrefix; // Defaults to ""
235 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
236 /// emitted before jump tables with the specified prefix.
237 const char *JumpTableSpecialLabelPrefix; // Default to null.
239 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
240 /// will enclose any GlobalVariable (that isn't a function)
242 const char *GlobalVarAddrPrefix; // Defaults to ""
243 const char *GlobalVarAddrSuffix; // Defaults to ""
245 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
246 /// will enclose any GlobalVariable that points to a function.
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 /// AllowQuotesInName - This is true if the assembler allows for complex
271 /// symbol names to be surrounded in quotes. This defaults to false.
272 bool AllowQuotesInName;
274 //===--- Data Emission Directives -------------------------------------===//
276 /// ZeroDirective - this should be set to the directive used to get some
277 /// number of zero bytes emitted to the current section. Common cases are
278 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
279 /// Data*bitsDirective's will be used to emit zero bytes.
280 const char *ZeroDirective; // Defaults to "\t.zero\t"
281 const char *ZeroDirectiveSuffix; // Defaults to ""
283 /// AsciiDirective - This directive allows emission of an ascii string with
284 /// the standard C escape characters embedded into it.
285 const char *AsciiDirective; // Defaults to "\t.ascii\t"
287 /// AscizDirective - If not null, this allows for special handling of
288 /// zero terminated strings on this target. This is commonly supported as
289 /// ".asciz". If a target doesn't support this, it can be set to null.
290 const char *AscizDirective; // Defaults to "\t.asciz\t"
292 /// DataDirectives - These directives are used to output some unit of
293 /// integer data to the current section. If a data directive is set to
294 /// null, smaller data directives will be used to emit the large sizes.
295 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
296 const char *Data16bitsDirective; // Defaults to "\t.short\t"
297 const char *Data32bitsDirective; // Defaults to "\t.long\t"
298 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
300 /// getDataASDirective - Return the directive that should be used to emit
301 /// data of the specified size to the specified numeric address space.
302 virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
303 assert(AS != 0 && "Don't know the directives for default addr space");
307 //===--- Alignment Information ----------------------------------------===//
309 /// AlignDirective - The directive used to emit round up to an alignment
312 const char *AlignDirective; // Defaults to "\t.align\t"
314 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
315 /// emits ".align N" directives, where N is the number of bytes to align to.
316 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
318 bool AlignmentIsInBytes; // Defaults to true
320 /// TextAlignFillValue - If non-zero, this is used to fill the executable
321 /// space created as the result of a alignment directive.
322 unsigned TextAlignFillValue;
324 //===--- Section Switching Directives ---------------------------------===//
326 /// SwitchToSectionDirective - This is the directive used when we want to
327 /// emit a global to an arbitrary section. The section name is emited after
329 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
331 /// TextSectionStartSuffix - This is printed after each start of section
332 /// directive for text sections.
333 const char *TextSectionStartSuffix; // Defaults to "".
335 /// DataSectionStartSuffix - This is printed after each start of section
336 /// directive for data sections.
337 const char *DataSectionStartSuffix; // Defaults to "".
339 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
340 /// section with the section name and this suffix printed.
341 const char *SectionEndDirectiveSuffix;// Defaults to null.
343 /// ConstantPoolSection - This is the section that we SwitchToSection right
344 /// before emitting the constant pool for a function.
345 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
347 /// JumpTableDataSection - This is the section that we SwitchToSection right
348 /// before emitting the jump tables for a function when the relocation model
350 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
352 /// JumpTableDirective - if non-null, the directive to emit before a jump
354 const char *JumpTableDirective;
356 /// CStringSection - If not null, this allows for special handling of
357 /// cstring constants (null terminated string that does not contain any
358 /// other null bytes) on this target. This is commonly supported as
360 const char *CStringSection; // Defaults to NULL
361 const Section *CStringSection_;
363 /// StaticCtorsSection - This is the directive that is emitted to switch to
364 /// a section to emit the static constructor list.
365 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
366 const char *StaticCtorsSection;
368 /// StaticDtorsSection - This is the directive that is emitted to switch to
369 /// a section to emit the static destructor list.
370 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
371 const char *StaticDtorsSection;
373 //===--- Global Variable Emission Directives --------------------------===//
375 /// GlobalDirective - This is the directive used to declare a global entity.
377 const char *GlobalDirective; // Defaults to NULL.
379 /// ExternDirective - This is the directive used to declare external
382 const char *ExternDirective; // 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 /// HasSingleParameterDotFile - True if the target has a single parameter
406 /// .file directive, this is true for ELF targets.
407 bool HasSingleParameterDotFile; // Defaults to true.
409 /// UsedDirective - This directive, if non-null, is used to declare a global
410 /// as being used somehow that the assembler can't see. This prevents dead
411 /// code elimination on some targets.
412 const char *UsedDirective; // Defaults to null.
414 /// WeakRefDirective - This directive, if non-null, is used to declare a
415 /// global as being a weak undefined symbol.
416 const char *WeakRefDirective; // Defaults to null.
418 /// WeakDefDirective - This directive, if non-null, is used to declare a
419 /// global as being a weak defined symbol.
420 const char *WeakDefDirective; // Defaults to null.
422 /// HiddenDirective - This directive, if non-null, is used to declare a
423 /// global or function as having hidden visibility.
424 const char *HiddenDirective; // Defaults to "\t.hidden\t".
426 /// ProtectedDirective - This directive, if non-null, is used to declare a
427 /// global or function as having protected visibility.
428 const char *ProtectedDirective; // Defaults to "\t.protected\t".
430 //===--- Dwarf Emission Directives -----------------------------------===//
432 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
433 /// offsets for debug information. Defaults to false.
434 bool AbsoluteDebugSectionOffsets;
436 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
437 /// offsets for EH information. Defaults to false.
438 bool AbsoluteEHSectionOffsets;
440 /// HasLEB128 - True if target asm supports leb128 directives.
442 bool HasLEB128; // Defaults to false.
444 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
445 /// directives for emitting debugging information.
447 bool HasDotLocAndDotFile; // Defaults to false.
449 /// SupportsDebugInformation - True if target supports emission of debugging
451 bool SupportsDebugInformation;
453 /// SupportsExceptionHandling - True if target supports
454 /// exception handling.
456 bool SupportsExceptionHandling; // Defaults to false.
458 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
460 bool DwarfRequiresFrameSection; // Defaults to true.
462 /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
463 /// encode inline subroutine information.
464 bool DwarfUsesInlineInfoSection; // Defaults to false.
466 /// Is_EHSymbolPrivate - If set, the "_foo.eh" is made private so that it
467 /// doesn't show up in the symbol table of the object file.
468 bool Is_EHSymbolPrivate; // Defaults to true.
470 /// GlobalEHDirective - This is the directive used to make exception frame
471 /// tables globally visible.
473 const char *GlobalEHDirective; // Defaults to NULL.
475 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
476 /// handle a weak_definition of constant 0 for an omitted EH frame.
477 bool SupportsWeakOmittedEHFrame; // Defaults to true.
479 /// DwarfSectionOffsetDirective - Special section offset directive.
480 const char* DwarfSectionOffsetDirective; // Defaults to NULL
482 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
484 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
486 /// DwarfInfoSection - Section directive for Dwarf info.
488 const char *DwarfInfoSection; // Defaults to ".debug_info".
490 /// DwarfLineSection - Section directive for Dwarf info.
492 const char *DwarfLineSection; // Defaults to ".debug_line".
494 /// DwarfFrameSection - Section directive for Dwarf info.
496 const char *DwarfFrameSection; // Defaults to ".debug_frame".
498 /// DwarfPubNamesSection - Section directive for Dwarf info.
500 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
502 /// DwarfPubTypesSection - Section directive for Dwarf info.
504 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
506 /// DwarfDebugInlineSection - Section directive for inline info.
508 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
510 /// DwarfStrSection - Section directive for Dwarf info.
512 const char *DwarfStrSection; // Defaults to ".debug_str".
514 /// DwarfLocSection - Section directive for Dwarf info.
516 const char *DwarfLocSection; // Defaults to ".debug_loc".
518 /// DwarfARangesSection - Section directive for Dwarf info.
520 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
522 /// DwarfRangesSection - Section directive for Dwarf info.
524 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
526 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
528 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
530 /// DwarfEHFrameSection - Section directive for Exception frames.
532 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
534 /// DwarfExceptionSection - Section directive for Exception table.
536 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
538 //===--- CBE Asm Translation Table -----------------------------------===//
540 const char *const *AsmTransCBE; // Defaults to empty
543 explicit TargetAsmInfo(const TargetMachine &TM);
544 virtual ~TargetAsmInfo();
546 const Section* getNamedSection(const char *Name,
547 unsigned Flags = SectionFlags::None,
548 bool Override = false) const;
549 const Section* getUnnamedSection(const char *Directive,
550 unsigned Flags = SectionFlags::None,
551 bool Override = false) const;
553 /// Measure the specified inline asm to determine an approximation of its
555 virtual unsigned getInlineAsmLength(const char *Str) const;
557 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
558 /// not to emit the UsedDirective for some symbols in llvm.used.
559 // FIXME: REMOVE this (rdar://7071300)
560 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
561 Mangler *Mang) const {
565 /// PreferredEHDataFormat - This hook allows the target to select data
566 /// format used for encoding pointers in exception handling data. Reason is
567 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
568 /// if the symbol can be relocated.
569 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
573 /// getSectionForMergableConstant - Given a mergable constant with the
574 /// specified size and relocation information, return a section that it
575 /// should be placed in.
576 virtual const Section *
577 getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const;
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 /// SectionFlagsForGlobal - This hook allows the target to select proper
587 /// section flags either for given global or for section.
588 // FIXME: Eliminate this.
590 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
591 const char* name = NULL) const;
593 /// SectionForGlobal - This hooks returns proper section name for given
594 /// global with all necessary flags and marks.
595 // FIXME: Eliminate this.
596 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
598 // Helper methods for SectionForGlobal
599 // FIXME: Eliminate this.
600 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
601 SectionKind::Kind kind) const;
603 const std::string &getSectionFlags(unsigned Flags) const;
604 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
606 // FIXME: Eliminate this.
607 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
609 /// getSLEB128Size - Compute the number of bytes required for a signed
611 static unsigned getSLEB128Size(int Value);
613 /// getULEB128Size - Compute the number of bytes required for an unsigned
615 static unsigned getULEB128Size(unsigned Value);
617 // Data directive accessors.
619 const char *getData8bitsDirective(unsigned AS = 0) const {
620 return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
622 const char *getData16bitsDirective(unsigned AS = 0) const {
623 return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
625 const char *getData32bitsDirective(unsigned AS = 0) const {
626 return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
628 const char *getData64bitsDirective(unsigned AS = 0) const {
629 return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
635 const Section *getTextSection() const {
638 const Section *getDataSection() const {
641 const char *getBSSSection() const {
644 const Section *getBSSSection_() const {
647 const Section *getReadOnlySection() const {
648 return ReadOnlySection;
650 const Section *getTLSDataSection() const {
651 return TLSDataSection;
653 const Section *getTLSBSSSection() const {
654 return TLSBSSSection;
656 const char *getZeroFillDirective() const {
657 return ZeroFillDirective;
659 const char *getNonexecutableStackDirective() const {
660 return NonexecutableStackDirective;
662 bool needsSet() const {
665 const char *getPCSymbol() const {
668 char getSeparatorChar() const {
669 return SeparatorChar;
671 unsigned getCommentColumn() const {
672 return CommentColumn;
674 const char *getCommentString() const {
675 return CommentString;
677 unsigned getOperandColumn(int operand) const {
678 return FirstOperandColumn + (MaxOperandLength+1)*(operand-1);
680 const char *getGlobalPrefix() const {
683 const char *getPrivateGlobalPrefix() const {
684 return PrivateGlobalPrefix;
686 const char *getLinkerPrivateGlobalPrefix() const {
687 return LinkerPrivateGlobalPrefix;
689 const char *getJumpTableSpecialLabelPrefix() const {
690 return JumpTableSpecialLabelPrefix;
692 const char *getGlobalVarAddrPrefix() const {
693 return GlobalVarAddrPrefix;
695 const char *getGlobalVarAddrSuffix() const {
696 return GlobalVarAddrSuffix;
698 const char *getFunctionAddrPrefix() const {
699 return FunctionAddrPrefix;
701 const char *getFunctionAddrSuffix() const {
702 return FunctionAddrSuffix;
704 const char *getPersonalityPrefix() const {
705 return PersonalityPrefix;
707 const char *getPersonalitySuffix() const {
708 return PersonalitySuffix;
710 bool getNeedsIndirectEncoding() const {
711 return NeedsIndirectEncoding;
713 const char *getInlineAsmStart() const {
714 return InlineAsmStart;
716 const char *getInlineAsmEnd() const {
719 unsigned getAssemblerDialect() const {
720 return AssemblerDialect;
722 bool doesAllowQuotesInName() const {
723 return AllowQuotesInName;
725 const char *getZeroDirective() const {
726 return ZeroDirective;
728 const char *getZeroDirectiveSuffix() const {
729 return ZeroDirectiveSuffix;
731 const char *getAsciiDirective() const {
732 return AsciiDirective;
734 const char *getAscizDirective() const {
735 return AscizDirective;
737 const char *getJumpTableDirective() const {
738 return JumpTableDirective;
740 const char *getAlignDirective() const {
741 return AlignDirective;
743 bool getAlignmentIsInBytes() const {
744 return AlignmentIsInBytes;
746 unsigned getTextAlignFillValue() const {
747 return TextAlignFillValue;
749 const char *getSwitchToSectionDirective() const {
750 return SwitchToSectionDirective;
752 const char *getTextSectionStartSuffix() const {
753 return TextSectionStartSuffix;
755 const char *getDataSectionStartSuffix() const {
756 return DataSectionStartSuffix;
758 const char *getSectionEndDirectiveSuffix() const {
759 return SectionEndDirectiveSuffix;
761 const char *getConstantPoolSection() const {
762 return ConstantPoolSection;
764 const char *getJumpTableDataSection() const {
765 return JumpTableDataSection;
767 const char *getCStringSection() const {
768 return CStringSection;
770 const Section *getCStringSection_() const {
771 return CStringSection_;
773 const char *getStaticCtorsSection() const {
774 return StaticCtorsSection;
776 const char *getStaticDtorsSection() const {
777 return StaticDtorsSection;
779 const char *getGlobalDirective() const {
780 return GlobalDirective;
782 const char *getExternDirective() const {
783 return ExternDirective;
785 const char *getSetDirective() const {
788 const char *getLCOMMDirective() const {
789 return LCOMMDirective;
791 const char *getCOMMDirective() const {
792 return COMMDirective;
794 bool getCOMMDirectiveTakesAlignment() const {
795 return COMMDirectiveTakesAlignment;
797 bool hasDotTypeDotSizeDirective() const {
798 return HasDotTypeDotSizeDirective;
800 bool hasSingleParameterDotFile() const {
801 return HasSingleParameterDotFile;
803 const char *getUsedDirective() const {
804 return UsedDirective;
806 const char *getWeakRefDirective() const {
807 return WeakRefDirective;
809 const char *getWeakDefDirective() const {
810 return WeakDefDirective;
812 const char *getHiddenDirective() const {
813 return HiddenDirective;
815 const char *getProtectedDirective() const {
816 return ProtectedDirective;
818 bool isAbsoluteDebugSectionOffsets() const {
819 return AbsoluteDebugSectionOffsets;
821 bool isAbsoluteEHSectionOffsets() const {
822 return AbsoluteEHSectionOffsets;
824 bool hasLEB128() const {
827 bool hasDotLocAndDotFile() const {
828 return HasDotLocAndDotFile;
830 bool doesSupportDebugInformation() const {
831 return SupportsDebugInformation;
833 bool doesSupportExceptionHandling() const {
834 return SupportsExceptionHandling;
836 bool doesDwarfRequireFrameSection() const {
837 return DwarfRequiresFrameSection;
839 bool doesDwarfUsesInlineInfoSection() const {
840 return DwarfUsesInlineInfoSection;
842 bool is_EHSymbolPrivate() const {
843 return Is_EHSymbolPrivate;
845 const char *getGlobalEHDirective() const {
846 return GlobalEHDirective;
848 bool getSupportsWeakOmittedEHFrame() const {
849 return SupportsWeakOmittedEHFrame;
851 const char *getDwarfSectionOffsetDirective() const {
852 return DwarfSectionOffsetDirective;
854 const char *getDwarfAbbrevSection() const {
855 return DwarfAbbrevSection;
857 const char *getDwarfInfoSection() const {
858 return DwarfInfoSection;
860 const char *getDwarfLineSection() const {
861 return DwarfLineSection;
863 const char *getDwarfFrameSection() const {
864 return DwarfFrameSection;
866 const char *getDwarfPubNamesSection() const {
867 return DwarfPubNamesSection;
869 const char *getDwarfPubTypesSection() const {
870 return DwarfPubTypesSection;
872 const char *getDwarfDebugInlineSection() const {
873 return DwarfDebugInlineSection;
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 *getDwarfMacroInfoSection() const {
888 return DwarfMacroInfoSection;
890 const char *getDwarfEHFrameSection() const {
891 return DwarfEHFrameSection;
893 const char *getDwarfExceptionSection() const {
894 return DwarfExceptionSection;
896 const char *const *getAsmCBE() const {