1 //===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains a class to be used as the basis for target specific
11 // asm writers. This class primarily takes care of global printing constants,
12 // which are used in very similar ways across all targets.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TARGET_ASM_INFO_H
17 #define LLVM_TARGET_ASM_INFO_H
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/StringMap.h"
21 #include "llvm/Support/DataTypes.h"
25 // DWARF encoding query type
26 namespace DwarfEncoding {
34 namespace SectionKind {
36 Unknown = 0, ///< Custom section
37 Text, ///< Text section
38 Data, ///< Data section
40 ROData, ///< Readonly data section
41 RODataMergeStr, ///< Readonly data section (mergeable strings)
42 RODataMergeConst, ///< Readonly data section (mergeable constants)
43 SmallData, ///< Small data section
44 SmallBSS, ///< Small bss section
45 SmallROData, ///< Small readonly section
46 ThreadData, ///< Initialized TLS data objects
47 ThreadBSS ///< Uninitialized TLS data objects
50 static inline bool isReadOnly(Kind K) {
51 return (K == SectionKind::ROData ||
52 K == SectionKind::RODataMergeConst ||
53 K == SectionKind::RODataMergeStr ||
54 K == SectionKind::SmallROData);
57 static inline bool isBSS(Kind K) {
58 return (K == SectionKind::BSS ||
59 K == SectionKind::SmallBSS);
63 namespace SectionFlags {
64 const unsigned Invalid = -1U;
65 const unsigned None = 0;
66 const unsigned Code = 1 << 0; ///< Section contains code
67 const unsigned Writeable = 1 << 1; ///< Section is writeable
68 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
69 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
70 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
71 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
72 const unsigned Debug = 1 << 6; ///< Section contains debug data
73 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
74 const unsigned Small = 1 << 8; ///< Section is small
75 const unsigned TypeFlags = 0xFF;
76 // Some gap for future flags
77 const unsigned Named = 1 << 23; ///< Section is named
78 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
80 static inline unsigned getEntitySize(unsigned Flags) {
81 return (Flags >> 24) & 0xFF;
84 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
85 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
89 static inline unsigned getEmptyKey() { return Invalid; }
90 static inline unsigned getTombstoneKey() { return Invalid - 1; }
91 static unsigned getHashValue(const unsigned &Key) { return Key; }
92 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
93 static bool isPod() { return true; }
96 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
106 friend class TargetAsmInfo;
107 friend class StringMapEntry<Section>;
112 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
114 bool isNamed() const { return Flags & SectionFlags::Named; }
115 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
117 const std::string& getName() const { return Name; }
118 unsigned getFlags() const { return Flags; }
121 /// TargetAsmInfo - This class is intended to be used as a base class for asm
122 /// properties and features specific to the target.
123 class TargetAsmInfo {
125 mutable StringMap<Section> Sections;
126 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
127 void fillDefaultValues();
129 /// TM - The current TargetMachine.
130 const TargetMachine &TM;
132 //===------------------------------------------------------------------===//
133 // Properties to be set by the target writer, used to configure asm printer.
136 /// TextSection - Section directive for standard text.
138 const Section *TextSection; // Defaults to ".text".
140 /// DataSection - Section directive for standard data.
142 const Section *DataSection; // Defaults to ".data".
144 /// BSSSection - Section directive for uninitialized data. Null if this
145 /// target doesn't support a BSS section.
147 const char *BSSSection; // Default to ".bss".
148 const Section *BSSSection_;
150 /// ReadOnlySection - This is the directive that is emitted to switch to a
151 /// read-only section for constant data (e.g. data declared const,
153 const Section *ReadOnlySection; // Defaults to NULL
155 /// SmallDataSection - This is the directive that is emitted to switch to a
156 /// small data section.
158 const Section *SmallDataSection; // Defaults to NULL
160 /// SmallBSSSection - This is the directive that is emitted to switch to a
161 /// small bss section.
163 const Section *SmallBSSSection; // Defaults to NULL
165 /// SmallRODataSection - This is the directive that is emitted to switch to
166 /// a small read-only data section.
168 const Section *SmallRODataSection; // Defaults to NULL
170 /// TLSDataSection - Section directive for Thread Local data.
172 const Section *TLSDataSection; // Defaults to ".tdata".
174 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
175 /// Null if this target doesn't support a BSS section.
177 const Section *TLSBSSSection; // Defaults to ".tbss".
179 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
180 /// section on this target. Null if this target doesn't support zerofill.
181 const char *ZeroFillDirective; // Default is null.
183 /// NonexecutableStackDirective - Directive for declaring to the
184 /// linker and beyond that the emitted code does not require stack
185 /// memory to be executable.
186 const char *NonexecutableStackDirective; // Default is null.
188 /// NeedsSet - True if target asm treats expressions in data directives
189 /// as linktime-relocatable. For assembly-time computation, we need to
190 /// use a .set. Thus:
193 /// is computed at assembly time, while
195 /// is relocated if the relative locations of x and y change at linktime.
196 /// We want both these things in different places.
197 bool NeedsSet; // Defaults to false.
199 /// MaxInstLength - This is the maximum possible length of an instruction,
200 /// which is needed to compute the size of an inline asm.
201 unsigned MaxInstLength; // Defaults to 4.
203 /// PCSymbol - The symbol used to represent the current PC. Used in PC
204 /// relative expressions.
205 const char *PCSymbol; // Defaults to "$".
207 /// SeparatorChar - This character, if specified, is used to separate
208 /// instructions from each other when on the same line. This is used to
209 /// measure inline asm instructions.
210 char SeparatorChar; // Defaults to ';'
212 /// CommentString - This indicates the comment character used by the
214 const char *CommentString; // Defaults to "#"
216 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
217 /// onto all global symbols. This is often used for "_" or ".".
218 const char *GlobalPrefix; // Defaults to ""
220 /// PrivateGlobalPrefix - This prefix is used for globals like constant
221 /// pool entries that are completely private to the .s file and should not
222 /// have names in the .o file. This is often "." or "L".
223 const char *PrivateGlobalPrefix; // Defaults to "."
225 /// LessPrivateGlobalPrefix - This prefix is used for symbols that should
226 /// be passed through the assembler but be removed by the linker. This
227 /// is "l" on Darwin, currently used for some ObjC metadata.
228 const char *LessPrivateGlobalPrefix; // Defaults to ""
230 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
231 /// emitted before jump tables with the specified prefix.
232 const char *JumpTableSpecialLabelPrefix; // Default to null.
234 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
235 /// will enclose any GlobalVariable (that isn't a function)
237 const char *GlobalVarAddrPrefix; // Defaults to ""
238 const char *GlobalVarAddrSuffix; // Defaults to ""
240 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
241 /// will enclose any GlobalVariable that points to a function.
242 /// For example, this is used by the IA64 backend to materialize
243 /// function descriptors, by decorating the ".data8" object with the
244 /// @verbatim @fptr( ) @endverbatim
245 /// link-relocation operator.
247 const char *FunctionAddrPrefix; // Defaults to ""
248 const char *FunctionAddrSuffix; // Defaults to ""
250 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
251 /// enclose any personality function in the common frame section.
253 const char *PersonalityPrefix; // Defaults to ""
254 const char *PersonalitySuffix; // Defaults to ""
256 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
259 bool NeedsIndirectEncoding; // Defaults to false
261 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
262 /// emit before and after an inline assembly statement.
263 const char *InlineAsmStart; // Defaults to "#APP\n"
264 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
266 /// AssemblerDialect - Which dialect of an assembler variant to use.
267 unsigned AssemblerDialect; // Defaults to 0
269 /// StringConstantPrefix - Prefix for FEs to use when generating unnamed
270 /// constant strings. These names get run through the Mangler later; if
271 /// you want the Mangler not to add the GlobalPrefix as well,
272 /// use '\1' as the first character.
273 const char *StringConstantPrefix; // Defaults to ".str"
275 //===--- Data Emission Directives -------------------------------------===//
277 /// ZeroDirective - this should be set to the directive used to get some
278 /// number of zero bytes emitted to the current section. Common cases are
279 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
280 /// Data*bitsDirective's will be used to emit zero bytes.
281 const char *ZeroDirective; // Defaults to "\t.zero\t"
282 const char *ZeroDirectiveSuffix; // Defaults to ""
284 /// AsciiDirective - This directive allows emission of an ascii string with
285 /// the standard C escape characters embedded into it.
286 const char *AsciiDirective; // Defaults to "\t.ascii\t"
288 /// AscizDirective - If not null, this allows for special handling of
289 /// zero terminated strings on this target. This is commonly supported as
290 /// ".asciz". If a target doesn't support this, it can be set to null.
291 const char *AscizDirective; // Defaults to "\t.asciz\t"
293 /// DataDirectives - These directives are used to output some unit of
294 /// integer data to the current section. If a data directive is set to
295 /// null, smaller data directives will be used to emit the large sizes.
296 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
297 const char *Data16bitsDirective; // Defaults to "\t.short\t"
298 const char *Data32bitsDirective; // Defaults to "\t.long\t"
299 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
301 /// getASDirective - Targets can override it to provide different data
302 /// directives for various sizes and non-default address spaces.
303 virtual const char *getASDirective(unsigned size,
306 && "Dont know the directives for default addr space");
310 //===--- Alignment Information ----------------------------------------===//
312 /// AlignDirective - The directive used to emit round up to an alignment
315 const char *AlignDirective; // Defaults to "\t.align\t"
317 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
318 /// emits ".align N" directives, where N is the number of bytes to align to.
319 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
321 bool AlignmentIsInBytes; // Defaults to true
323 /// TextAlignFillValue - If non-zero, this is used to fill the executable
324 /// space created as the result of a alignment directive.
325 unsigned TextAlignFillValue;
327 //===--- Section Switching Directives ---------------------------------===//
329 /// SwitchToSectionDirective - This is the directive used when we want to
330 /// emit a global to an arbitrary section. The section name is emited after
332 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
334 /// TextSectionStartSuffix - This is printed after each start of section
335 /// directive for text sections.
336 const char *TextSectionStartSuffix; // Defaults to "".
338 /// DataSectionStartSuffix - This is printed after each start of section
339 /// directive for data sections.
340 const char *DataSectionStartSuffix; // Defaults to "".
342 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
343 /// section with the section name and this suffix printed.
344 const char *SectionEndDirectiveSuffix;// Defaults to null.
346 /// ConstantPoolSection - This is the section that we SwitchToSection right
347 /// before emitting the constant pool for a function.
348 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
350 /// JumpTableDataSection - This is the section that we SwitchToSection right
351 /// before emitting the jump tables for a function when the relocation model
353 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
355 /// JumpTableDirective - if non-null, the directive to emit before a jump
357 const char *JumpTableDirective;
359 /// CStringSection - If not null, this allows for special handling of
360 /// cstring constants (null terminated string that does not contain any
361 /// other null bytes) on this target. This is commonly supported as
363 const char *CStringSection; // Defaults to NULL
364 const Section *CStringSection_;
366 /// StaticCtorsSection - This is the directive that is emitted to switch to
367 /// a section to emit the static constructor list.
368 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
369 const char *StaticCtorsSection;
371 /// StaticDtorsSection - This is the directive that is emitted to switch to
372 /// a section to emit the static destructor list.
373 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
374 const char *StaticDtorsSection;
376 //===--- Global Variable Emission Directives --------------------------===//
378 /// GlobalDirective - This is the directive used to declare a global entity.
380 const char *GlobalDirective; // Defaults to NULL.
382 /// SetDirective - This is the name of a directive that can be used to tell
383 /// the assembler to set the value of a variable to some expression.
384 const char *SetDirective; // Defaults to null.
386 /// LCOMMDirective - This is the name of a directive (if supported) that can
387 /// be used to efficiently declare a local (internal) block of zero
388 /// initialized data in the .bss/.data section. The syntax expected is:
389 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
391 const char *LCOMMDirective; // Defaults to null.
393 const char *COMMDirective; // Defaults to "\t.comm\t".
395 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
396 /// argument that specifies the alignment of the declaration.
397 bool COMMDirectiveTakesAlignment; // Defaults to true.
399 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
400 /// directives, this is true for most ELF targets.
401 bool HasDotTypeDotSizeDirective; // Defaults to true.
403 /// HasSingleParameterDotFile - True if the target has a single parameter
404 /// .file directive, this is true for ELF targets.
405 bool HasSingleParameterDotFile; // Defaults to true.
407 /// UsedDirective - This directive, if non-null, is used to declare a global
408 /// as being used somehow that the assembler can't see. This prevents dead
409 /// code elimination on some targets.
410 const char *UsedDirective; // Defaults to null.
412 /// WeakRefDirective - This directive, if non-null, is used to declare a
413 /// global as being a weak undefined symbol.
414 const char *WeakRefDirective; // Defaults to null.
416 /// WeakDefDirective - This directive, if non-null, is used to declare a
417 /// global as being a weak defined symbol.
418 const char *WeakDefDirective; // Defaults to null.
420 /// HiddenDirective - This directive, if non-null, is used to declare a
421 /// global or function as having hidden visibility.
422 const char *HiddenDirective; // Defaults to "\t.hidden\t".
424 /// ProtectedDirective - This directive, if non-null, is used to declare a
425 /// global or function as having protected visibility.
426 const char *ProtectedDirective; // Defaults to "\t.protected\t".
428 //===--- Dwarf Emission Directives -----------------------------------===//
430 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
431 /// offsets for debug information. Defaults to false.
432 bool AbsoluteDebugSectionOffsets;
434 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
435 /// offsets for EH information. Defaults to false.
436 bool AbsoluteEHSectionOffsets;
438 /// HasLEB128 - True if target asm supports leb128 directives.
440 bool HasLEB128; // Defaults to false.
442 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
443 /// directives for emitting debugging information.
445 bool HasDotLocAndDotFile; // Defaults to false.
447 /// SupportsDebugInformation - True if target supports emission of debugging
449 bool SupportsDebugInformation;
451 /// SupportsExceptionHandling - True if target supports
452 /// exception handling.
454 bool SupportsExceptionHandling; // Defaults to false.
456 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
458 bool DwarfRequiresFrameSection; // Defaults to true.
460 /// SupportsMacInfo - true if the Dwarf output supports macro information
462 bool SupportsMacInfoSection; // Defaults to true
464 /// NonLocalEHFrameLabel - If set, the EH_frame label needs to be non-local.
466 bool NonLocalEHFrameLabel; // Defaults to false.
468 /// GlobalEHDirective - This is the directive used to make exception frame
469 /// tables globally visible.
471 const char *GlobalEHDirective; // Defaults to NULL.
473 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
474 /// handle a weak_definition of constant 0 for an omitted EH frame.
475 bool SupportsWeakOmittedEHFrame; // Defaults to true.
477 /// DwarfSectionOffsetDirective - Special section offset directive.
478 const char* DwarfSectionOffsetDirective; // Defaults to NULL
480 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
482 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
484 /// DwarfInfoSection - Section directive for Dwarf info.
486 const char *DwarfInfoSection; // Defaults to ".debug_info".
488 /// DwarfLineSection - Section directive for Dwarf info.
490 const char *DwarfLineSection; // Defaults to ".debug_line".
492 /// DwarfFrameSection - Section directive for Dwarf info.
494 const char *DwarfFrameSection; // Defaults to ".debug_frame".
496 /// DwarfPubNamesSection - Section directive for Dwarf info.
498 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
500 /// DwarfPubTypesSection - Section directive for Dwarf info.
502 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
504 /// DwarfStrSection - Section directive for Dwarf info.
506 const char *DwarfStrSection; // Defaults to ".debug_str".
508 /// DwarfLocSection - Section directive for Dwarf info.
510 const char *DwarfLocSection; // Defaults to ".debug_loc".
512 /// DwarfARangesSection - Section directive for Dwarf info.
514 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
516 /// DwarfRangesSection - Section directive for Dwarf info.
518 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
520 /// DwarfMacInfoSection - Section directive for Dwarf info.
522 const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
524 /// DwarfEHFrameSection - Section directive for Exception frames.
526 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
528 /// DwarfExceptionSection - Section directive for Exception table.
530 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
532 //===--- CBE Asm Translation Table -----------------------------------===//
534 const char *const *AsmTransCBE; // Defaults to empty
537 explicit TargetAsmInfo(const TargetMachine &TM);
538 virtual ~TargetAsmInfo();
540 const Section* getNamedSection(const char *Name,
541 unsigned Flags = SectionFlags::None,
542 bool Override = false) const;
543 const Section* getUnnamedSection(const char *Directive,
544 unsigned Flags = SectionFlags::None,
545 bool Override = false) const;
547 /// Measure the specified inline asm to determine an approximation of its
549 virtual unsigned getInlineAsmLength(const char *Str) const;
551 /// ExpandInlineAsm - This hook allows the target to expand an inline asm
552 /// call to be explicit llvm code if it wants to. This is useful for
553 /// turning simple inline asms into LLVM intrinsics, which gives the
554 /// compiler more information about the behavior of the code.
555 virtual bool ExpandInlineAsm(CallInst *CI) const {
559 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
560 /// not to emit the UsedDirective for some symbols in llvm.used.
561 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
562 Mangler *Mang) const {
566 /// PreferredEHDataFormat - This hook allows the target to select data
567 /// format used for encoding pointers in exception handling data. Reason is
568 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
569 /// if the symbol can be relocated.
570 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
573 /// SectionKindForGlobal - This hook allows the target to select proper
574 /// section kind used for global emission.
575 virtual SectionKind::Kind
576 SectionKindForGlobal(const GlobalValue *GV) const;
579 /// SectionFlagsForGlobal - This hook allows the target to select proper
580 /// section flags either for given global or for section.
582 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
583 const char* name = NULL) const;
585 /// SectionForGlobal - This hooks returns proper section name for given
586 /// global with all necessary flags and marks.
587 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
589 // Helper methods for SectionForGlobal
590 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
591 SectionKind::Kind kind) const;
593 const std::string& getSectionFlags(unsigned Flags) const;
594 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
596 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
598 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
600 /// getSLEB128Size - Compute the number of bytes required for a signed
603 static unsigned getSLEB128Size(int Value);
605 /// getULEB128Size - Compute the number of bytes required for an unsigned
608 static unsigned getULEB128Size(unsigned Value);
610 // Data directive accessors
612 const char *getData8bitsDirective(unsigned AS = 0) const {
613 return AS == 0 ? Data8bitsDirective : getASDirective(8, AS);
615 const char *getData16bitsDirective(unsigned AS = 0) const {
616 return AS == 0 ? Data16bitsDirective : getASDirective(16, AS);
618 const char *getData32bitsDirective(unsigned AS = 0) const {
619 return AS == 0 ? Data32bitsDirective : getASDirective(32, AS);
621 const char *getData64bitsDirective(unsigned AS = 0) const {
622 return AS == 0 ? Data64bitsDirective : getASDirective(64, AS);
628 const Section *getTextSection() const {
631 const Section *getDataSection() const {
634 const char *getBSSSection() const {
637 const Section *getBSSSection_() const {
640 const Section *getReadOnlySection() const {
641 return ReadOnlySection;
643 const Section *getSmallDataSection() const {
644 return SmallDataSection;
646 const Section *getSmallBSSSection() const {
647 return SmallBSSSection;
649 const Section *getSmallRODataSection() const {
650 return SmallRODataSection;
652 const Section *getTLSDataSection() const {
653 return TLSDataSection;
655 const Section *getTLSBSSSection() const {
656 return TLSBSSSection;
658 const char *getZeroFillDirective() const {
659 return ZeroFillDirective;
661 const char *getNonexecutableStackDirective() const {
662 return NonexecutableStackDirective;
664 bool needsSet() const {
667 const char *getPCSymbol() const {
670 char getSeparatorChar() const {
671 return SeparatorChar;
673 const char *getCommentString() const {
674 return CommentString;
676 const char *getGlobalPrefix() const {
679 const char *getPrivateGlobalPrefix() const {
680 return PrivateGlobalPrefix;
682 /// EHGlobalPrefix - Prefix for EH_frame and the .eh symbols.
683 /// This is normally PrivateGlobalPrefix, but some targets want
684 /// these symbols to be visible.
685 virtual const char *getEHGlobalPrefix() const {
686 return PrivateGlobalPrefix;
688 const char *getLessPrivateGlobalPrefix() const {
689 return LessPrivateGlobalPrefix;
691 const char *getJumpTableSpecialLabelPrefix() const {
692 return JumpTableSpecialLabelPrefix;
694 const char *getGlobalVarAddrPrefix() const {
695 return GlobalVarAddrPrefix;
697 const char *getGlobalVarAddrSuffix() const {
698 return GlobalVarAddrSuffix;
700 const char *getFunctionAddrPrefix() const {
701 return FunctionAddrPrefix;
703 const char *getFunctionAddrSuffix() const {
704 return FunctionAddrSuffix;
706 const char *getPersonalityPrefix() const {
707 return PersonalityPrefix;
709 const char *getPersonalitySuffix() const {
710 return PersonalitySuffix;
712 bool getNeedsIndirectEncoding() const {
713 return NeedsIndirectEncoding;
715 const char *getInlineAsmStart() const {
716 return InlineAsmStart;
718 const char *getInlineAsmEnd() const {
721 unsigned getAssemblerDialect() const {
722 return AssemblerDialect;
724 const char *getStringConstantPrefix() const {
725 return StringConstantPrefix;
727 const char *getZeroDirective() const {
728 return ZeroDirective;
730 const char *getZeroDirectiveSuffix() const {
731 return ZeroDirectiveSuffix;
733 const char *getAsciiDirective() const {
734 return AsciiDirective;
736 const char *getAscizDirective() const {
737 return AscizDirective;
739 const char *getJumpTableDirective() const {
740 return JumpTableDirective;
742 const char *getAlignDirective() const {
743 return AlignDirective;
745 bool getAlignmentIsInBytes() const {
746 return AlignmentIsInBytes;
748 unsigned getTextAlignFillValue() const {
749 return TextAlignFillValue;
751 const char *getSwitchToSectionDirective() const {
752 return SwitchToSectionDirective;
754 const char *getTextSectionStartSuffix() const {
755 return TextSectionStartSuffix;
757 const char *getDataSectionStartSuffix() const {
758 return DataSectionStartSuffix;
760 const char *getSectionEndDirectiveSuffix() const {
761 return SectionEndDirectiveSuffix;
763 const char *getConstantPoolSection() const {
764 return ConstantPoolSection;
766 const char *getJumpTableDataSection() const {
767 return JumpTableDataSection;
769 const char *getCStringSection() const {
770 return CStringSection;
772 const Section *getCStringSection_() const {
773 return CStringSection_;
775 const char *getStaticCtorsSection() const {
776 return StaticCtorsSection;
778 const char *getStaticDtorsSection() const {
779 return StaticDtorsSection;
781 const char *getGlobalDirective() const {
782 return GlobalDirective;
784 const char *getSetDirective() const {
787 const char *getLCOMMDirective() const {
788 return LCOMMDirective;
790 const char *getCOMMDirective() const {
791 return COMMDirective;
793 bool getCOMMDirectiveTakesAlignment() const {
794 return COMMDirectiveTakesAlignment;
796 bool hasDotTypeDotSizeDirective() const {
797 return HasDotTypeDotSizeDirective;
799 bool hasSingleParameterDotFile() const {
800 return HasSingleParameterDotFile;
802 const char *getUsedDirective() const {
803 return UsedDirective;
805 const char *getWeakRefDirective() const {
806 return WeakRefDirective;
808 const char *getWeakDefDirective() const {
809 return WeakDefDirective;
811 const char *getHiddenDirective() const {
812 return HiddenDirective;
814 const char *getProtectedDirective() const {
815 return ProtectedDirective;
817 bool isAbsoluteDebugSectionOffsets() const {
818 return AbsoluteDebugSectionOffsets;
820 bool isAbsoluteEHSectionOffsets() const {
821 return AbsoluteEHSectionOffsets;
823 bool hasLEB128() const {
826 bool hasDotLocAndDotFile() const {
827 return HasDotLocAndDotFile;
829 bool doesSupportDebugInformation() const {
830 return SupportsDebugInformation;
832 bool doesSupportExceptionHandling() const {
833 return SupportsExceptionHandling;
835 bool doesDwarfRequireFrameSection() const {
836 return DwarfRequiresFrameSection;
838 bool doesSupportMacInfoSection() const {
839 return SupportsMacInfoSection;
841 bool doesRequireNonLocalEHFrameLabel() const {
842 return NonLocalEHFrameLabel;
844 const char *getGlobalEHDirective() const {
845 return GlobalEHDirective;
847 bool getSupportsWeakOmittedEHFrame() const {
848 return SupportsWeakOmittedEHFrame;
850 const char *getDwarfSectionOffsetDirective() const {
851 return DwarfSectionOffsetDirective;
853 const char *getDwarfAbbrevSection() const {
854 return DwarfAbbrevSection;
856 const char *getDwarfInfoSection() const {
857 return DwarfInfoSection;
859 const char *getDwarfLineSection() const {
860 return DwarfLineSection;
862 const char *getDwarfFrameSection() const {
863 return DwarfFrameSection;
865 const char *getDwarfPubNamesSection() const {
866 return DwarfPubNamesSection;
868 const char *getDwarfPubTypesSection() const {
869 return DwarfPubTypesSection;
871 const char *getDwarfStrSection() const {
872 return DwarfStrSection;
874 const char *getDwarfLocSection() const {
875 return DwarfLocSection;
877 const char *getDwarfARangesSection() const {
878 return DwarfARangesSection;
880 const char *getDwarfRangesSection() const {
881 return DwarfRangesSection;
883 const char *getDwarfMacInfoSection() const {
884 return DwarfMacInfoSection;
886 const char *getDwarfEHFrameSection() const {
887 return DwarfEHFrameSection;
889 const char *getDwarfExceptionSection() const {
890 return DwarfExceptionSection;
892 const char *const *getAsmCBE() const {