1 //===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains a class to be used as the basis for target specific
11 // asm writers. This class primarily takes care of global printing constants,
12 // which are used in very similar ways across all targets.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TARGET_ASM_INFO_H
17 #define LLVM_TARGET_ASM_INFO_H
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/StringMap.h"
21 #include "llvm/Support/DataTypes.h"
25 // DWARF encoding query type
26 namespace DwarfEncoding {
34 namespace SectionKind {
36 Unknown = 0, ///< Custom section
37 Text, ///< Text section
38 Data, ///< Data section
40 ROData, ///< Readonly data section
41 RODataMergeStr, ///< Readonly data section (mergeable strings)
42 RODataMergeConst, ///< Readonly data section (mergeable constants)
43 SmallData, ///< Small data section
44 SmallBSS, ///< Small bss section
45 SmallROData, ///< Small readonly section
46 ThreadData, ///< Initialized TLS data objects
47 ThreadBSS ///< Uninitialized TLS data objects
50 static inline bool isReadOnly(Kind K) {
51 return (K == SectionKind::ROData ||
52 K == SectionKind::RODataMergeConst ||
53 K == SectionKind::RODataMergeStr ||
54 K == SectionKind::SmallROData);
57 static inline bool isBSS(Kind K) {
58 return (K == SectionKind::BSS ||
59 K == SectionKind::SmallBSS);
63 namespace SectionFlags {
64 const unsigned Invalid = -1U;
65 const unsigned None = 0;
66 const unsigned Code = 1 << 0; ///< Section contains code
67 const unsigned Writeable = 1 << 1; ///< Section is writeable
68 const unsigned BSS = 1 << 2; ///< Section contains only zeroes
69 const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
70 const unsigned Strings = 1 << 4; ///< Section contains C-type strings
71 const unsigned TLS = 1 << 5; ///< Section contains thread-local data
72 const unsigned Debug = 1 << 6; ///< Section contains debug data
73 const unsigned Linkonce = 1 << 7; ///< Section is linkonce
74 const unsigned Small = 1 << 8; ///< Section is small
75 const unsigned TypeFlags = 0xFF;
76 // Some gap for future flags
77 const unsigned Named = 1 << 23; ///< Section is named
78 const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff
80 static inline unsigned getEntitySize(unsigned Flags) {
81 return (Flags >> 24) & 0xFF;
84 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
85 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
89 static inline unsigned getEmptyKey() { return Invalid; }
90 static inline unsigned getTombstoneKey() { return Invalid - 1; }
91 static unsigned getHashValue(const unsigned &Key) { return Key; }
92 static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
93 static bool isPod() { return true; }
96 typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType;
106 friend class TargetAsmInfo;
107 friend class StringMapEntry<Section>;
112 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
114 bool isNamed() const { return Flags & SectionFlags::Named; }
115 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
117 const std::string& getName() const { return Name; }
118 unsigned getFlags() const { return Flags; }
121 /// TargetAsmInfo - This class is intended to be used as a base class for asm
122 /// properties and features specific to the target.
123 class TargetAsmInfo {
125 mutable StringMap<Section> Sections;
126 mutable SectionFlags::FlagsStringsMapType FlagsStrings;
128 //===------------------------------------------------------------------===//
129 // Properties to be set by the target writer, used to configure asm printer.
132 /// TextSection - Section directive for standard text.
134 const Section *TextSection; // Defaults to ".text".
136 /// DataSection - Section directive for standard data.
138 const Section *DataSection; // Defaults to ".data".
140 /// BSSSection - Section directive for uninitialized data. Null if this
141 /// target doesn't support a BSS section.
143 const char *BSSSection; // Default to ".bss".
144 const Section *BSSSection_;
146 /// ReadOnlySection - This is the directive that is emitted to switch to a
147 /// read-only section for constant data (e.g. data declared const,
149 const char *ReadOnlySection; // Defaults to NULL
150 const Section *ReadOnlySection_;
152 /// SmallDataSection - This is the directive that is emitted to switch to a
153 /// small data section.
155 const Section *SmallDataSection; // Defaults to NULL
157 /// SmallBSSSection - This is the directive that is emitted to switch to a
158 /// small bss section.
160 const Section *SmallBSSSection; // Defaults to NULL
162 /// SmallRODataSection - This is the directive that is emitted to switch to
163 /// a small read-only data section.
165 const Section *SmallRODataSection; // Defaults to NULL
167 /// TLSDataSection - Section directive for Thread Local data.
169 const Section *TLSDataSection; // Defaults to ".tdata".
171 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
172 /// Null if this target doesn't support a BSS section.
174 const Section *TLSBSSSection; // Defaults to ".tbss".
176 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
177 /// section on this target. Null if this target doesn't support zerofill.
178 const char *ZeroFillDirective; // Default is null.
180 /// NonexecutableStackDirective - Directive for declaring to the
181 /// linker and beyond that the emitted code does not require stack
182 /// memory to be executable.
183 const char *NonexecutableStackDirective; // Default is null.
185 /// NeedsSet - True if target asm treats expressions in data directives
186 /// as linktime-relocatable. For assembly-time computation, we need to
187 /// use a .set. Thus:
190 /// is computed at assembly time, while
192 /// is relocated if the relative locations of x and y change at linktime.
193 /// We want both these things in different places.
194 bool NeedsSet; // Defaults to false.
196 /// MaxInstLength - This is the maximum possible length of an instruction,
197 /// which is needed to compute the size of an inline asm.
198 unsigned MaxInstLength; // Defaults to 4.
200 /// PCSymbol - The symbol used to represent the current PC. Used in PC
201 /// relative expressions.
202 const char *PCSymbol; // Defaults to "$".
204 /// SeparatorChar - This character, if specified, is used to separate
205 /// instructions from each other when on the same line. This is used to
206 /// measure inline asm instructions.
207 char SeparatorChar; // Defaults to ';'
209 /// CommentString - This indicates the comment character used by the
211 const char *CommentString; // Defaults to "#"
213 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
214 /// onto all global symbols. This is often used for "_" or ".".
215 const char *GlobalPrefix; // Defaults to ""
217 /// PrivateGlobalPrefix - This prefix is used for globals like constant
218 /// pool entries that are completely private to the .s file and should not
219 /// have names in the .o file. This is often "." or "L".
220 const char *PrivateGlobalPrefix; // Defaults to "."
222 /// LessPrivateGlobalPrefix - This prefix is used for symbols that should
223 /// be passed through the assembler but be removed by the linker. This
224 /// is "l" on Darwin, currently used for some ObjC metadata.
225 const char *LessPrivateGlobalPrefix; // Defaults to ""
227 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
228 /// emitted before jump tables with the specified prefix.
229 const char *JumpTableSpecialLabelPrefix; // Default to null.
231 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
232 /// will enclose any GlobalVariable (that isn't a function)
234 const char *GlobalVarAddrPrefix; // Defaults to ""
235 const char *GlobalVarAddrSuffix; // Defaults to ""
237 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
238 /// will enclose any GlobalVariable that points to a function.
239 /// For example, this is used by the IA64 backend to materialize
240 /// function descriptors, by decorating the ".data8" object with the
241 /// @verbatim @fptr( ) @endverbatim
242 /// link-relocation operator.
244 const char *FunctionAddrPrefix; // Defaults to ""
245 const char *FunctionAddrSuffix; // Defaults to ""
247 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
248 /// enclose any personality function in the common frame section.
250 const char *PersonalityPrefix; // Defaults to ""
251 const char *PersonalitySuffix; // Defaults to ""
253 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
256 bool NeedsIndirectEncoding; // Defaults to false
258 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
259 /// emit before and after an inline assembly statement.
260 const char *InlineAsmStart; // Defaults to "#APP\n"
261 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
263 /// AssemblerDialect - Which dialect of an assembler variant to use.
264 unsigned AssemblerDialect; // Defaults to 0
266 /// StringConstantPrefix - Prefix for FEs to use when generating unnamed
267 /// constant strings. These names get run through the Mangler later; if
268 /// you want the Mangler not to add the GlobalPrefix as well,
269 /// use '\1' as the first character.
270 const char *StringConstantPrefix; // Defaults to ".str"
272 //===--- Data Emission Directives -------------------------------------===//
274 /// ZeroDirective - this should be set to the directive used to get some
275 /// number of zero bytes emitted to the current section. Common cases are
276 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
277 /// Data*bitsDirective's will be used to emit zero bytes.
278 const char *ZeroDirective; // Defaults to "\t.zero\t"
279 const char *ZeroDirectiveSuffix; // Defaults to ""
281 /// AsciiDirective - This directive allows emission of an ascii string with
282 /// the standard C escape characters embedded into it.
283 const char *AsciiDirective; // Defaults to "\t.ascii\t"
285 /// AscizDirective - If not null, this allows for special handling of
286 /// zero terminated strings on this target. This is commonly supported as
287 /// ".asciz". If a target doesn't support this, it can be set to null.
288 const char *AscizDirective; // Defaults to "\t.asciz\t"
290 /// DataDirectives - These directives are used to output some unit of
291 /// integer data to the current section. If a data directive is set to
292 /// null, smaller data directives will be used to emit the large sizes.
293 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
294 const char *Data16bitsDirective; // Defaults to "\t.short\t"
295 const char *Data32bitsDirective; // Defaults to "\t.long\t"
296 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
298 //===--- Alignment Information ----------------------------------------===//
300 /// AlignDirective - The directive used to emit round up to an alignment
303 const char *AlignDirective; // Defaults to "\t.align\t"
305 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
306 /// emits ".align N" directives, where N is the number of bytes to align to.
307 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
309 bool AlignmentIsInBytes; // Defaults to true
311 /// TextAlignFillValue - If non-zero, this is used to fill the executable
312 /// space created as the result of a alignment directive.
313 unsigned TextAlignFillValue;
315 //===--- Section Switching Directives ---------------------------------===//
317 /// SwitchToSectionDirective - This is the directive used when we want to
318 /// emit a global to an arbitrary section. The section name is emited after
320 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
322 /// TextSectionStartSuffix - This is printed after each start of section
323 /// directive for text sections.
324 const char *TextSectionStartSuffix; // Defaults to "".
326 /// DataSectionStartSuffix - This is printed after each start of section
327 /// directive for data sections.
328 const char *DataSectionStartSuffix; // Defaults to "".
330 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
331 /// section with the section name and this suffix printed.
332 const char *SectionEndDirectiveSuffix;// Defaults to null.
334 /// ConstantPoolSection - This is the section that we SwitchToSection right
335 /// before emitting the constant pool for a function.
336 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
338 /// JumpTableDataSection - This is the section that we SwitchToSection right
339 /// before emitting the jump tables for a function when the relocation model
341 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
343 /// JumpTableDirective - if non-null, the directive to emit before a jump
345 const char *JumpTableDirective;
347 /// CStringSection - If not null, this allows for special handling of
348 /// cstring constants (null terminated string that does not contain any
349 /// other null bytes) on this target. This is commonly supported as
351 const char *CStringSection; // Defaults to NULL
352 const Section *CStringSection_;
354 /// StaticCtorsSection - This is the directive that is emitted to switch to
355 /// a section to emit the static constructor list.
356 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
357 const char *StaticCtorsSection;
359 /// StaticDtorsSection - This is the directive that is emitted to switch to
360 /// a section to emit the static destructor list.
361 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
362 const char *StaticDtorsSection;
364 //===--- Global Variable Emission Directives --------------------------===//
366 /// GlobalDirective - This is the directive used to declare a global entity.
368 const char *GlobalDirective; // Defaults to NULL.
370 /// SetDirective - This is the name of a directive that can be used to tell
371 /// the assembler to set the value of a variable to some expression.
372 const char *SetDirective; // Defaults to null.
374 /// LCOMMDirective - This is the name of a directive (if supported) that can
375 /// be used to efficiently declare a local (internal) block of zero
376 /// initialized data in the .bss/.data section. The syntax expected is:
377 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
379 const char *LCOMMDirective; // Defaults to null.
381 const char *COMMDirective; // Defaults to "\t.comm\t".
383 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
384 /// argument that specifies the alignment of the declaration.
385 bool COMMDirectiveTakesAlignment; // Defaults to true.
387 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
388 /// directives, this is true for most ELF targets.
389 bool HasDotTypeDotSizeDirective; // Defaults to true.
391 /// UsedDirective - This directive, if non-null, is used to declare a global
392 /// as being used somehow that the assembler can't see. This prevents dead
393 /// code elimination on some targets.
394 const char *UsedDirective; // Defaults to null.
396 /// WeakRefDirective - This directive, if non-null, is used to declare a
397 /// global as being a weak undefined symbol.
398 const char *WeakRefDirective; // Defaults to null.
400 /// WeakDefDirective - This directive, if non-null, is used to declare a
401 /// global as being a weak defined symbol.
402 const char *WeakDefDirective; // Defaults to null.
404 /// HiddenDirective - This directive, if non-null, is used to declare a
405 /// global or function as having hidden visibility.
406 const char *HiddenDirective; // Defaults to "\t.hidden\t".
408 /// ProtectedDirective - This directive, if non-null, is used to declare a
409 /// global or function as having protected visibility.
410 const char *ProtectedDirective; // Defaults to "\t.protected\t".
412 //===--- Dwarf Emission Directives -----------------------------------===//
414 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
415 /// offsets for debug information. Defaults to false.
416 bool AbsoluteDebugSectionOffsets;
418 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
419 /// offsets for EH information. Defaults to false.
420 bool AbsoluteEHSectionOffsets;
422 /// HasLEB128 - True if target asm supports leb128 directives.
424 bool HasLEB128; // Defaults to false.
426 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
427 /// directives for emitting debugging information.
429 bool HasDotLocAndDotFile; // Defaults to false.
431 /// SupportsDebugInformation - True if target supports emission of debugging
433 bool SupportsDebugInformation;
435 /// SupportsExceptionHandling - True if target supports
436 /// exception handling.
438 bool SupportsExceptionHandling; // Defaults to false.
440 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
442 bool DwarfRequiresFrameSection; // Defaults to true.
444 /// GlobalEHDirective - This is the directive used to make exception frame
445 /// tables globally visible.
447 const char *GlobalEHDirective; // Defaults to NULL.
449 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
450 /// handle a weak_definition of constant 0 for an omitted EH frame.
451 bool SupportsWeakOmittedEHFrame; // Defaults to true.
453 /// DwarfSectionOffsetDirective - Special section offset directive.
454 const char* DwarfSectionOffsetDirective; // Defaults to NULL
456 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
458 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
460 /// DwarfInfoSection - Section directive for Dwarf info.
462 const char *DwarfInfoSection; // Defaults to ".debug_info".
464 /// DwarfLineSection - Section directive for Dwarf info.
466 const char *DwarfLineSection; // Defaults to ".debug_line".
468 /// DwarfFrameSection - Section directive for Dwarf info.
470 const char *DwarfFrameSection; // Defaults to ".debug_frame".
472 /// DwarfPubNamesSection - Section directive for Dwarf info.
474 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
476 /// DwarfPubTypesSection - Section directive for Dwarf info.
478 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
480 /// DwarfStrSection - Section directive for Dwarf info.
482 const char *DwarfStrSection; // Defaults to ".debug_str".
484 /// DwarfLocSection - Section directive for Dwarf info.
486 const char *DwarfLocSection; // Defaults to ".debug_loc".
488 /// DwarfARangesSection - Section directive for Dwarf info.
490 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
492 /// DwarfRangesSection - Section directive for Dwarf info.
494 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
496 /// DwarfMacInfoSection - Section directive for Dwarf info.
498 const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
500 /// DwarfEHFrameSection - Section directive for Exception frames.
502 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
504 /// DwarfExceptionSection - Section directive for Exception table.
506 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
508 //===--- CBE Asm Translation Table -----------------------------------===//
510 const char *const *AsmTransCBE; // Defaults to empty
514 virtual ~TargetAsmInfo();
516 const Section* getNamedSection(const char *Name,
517 unsigned Flags = SectionFlags::None,
518 bool Override = false) const;
519 const Section* getUnnamedSection(const char *Directive,
520 unsigned Flags = SectionFlags::None,
521 bool Override = false) const;
523 /// Measure the specified inline asm to determine an approximation of its
525 virtual unsigned getInlineAsmLength(const char *Str) const;
527 /// ExpandInlineAsm - This hook allows the target to expand an inline asm
528 /// call to be explicit llvm code if it wants to. This is useful for
529 /// turning simple inline asms into LLVM intrinsics, which gives the
530 /// compiler more information about the behavior of the code.
531 virtual bool ExpandInlineAsm(CallInst *CI) const {
535 /// emitUsedDirectiveFor - This hook allows targets to selectively decide
536 /// not to emit the UsedDirective for some symbols in llvm.used.
537 virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
538 Mangler *Mang) const {
542 /// PreferredEHDataFormat - This hook allows the target to select data
543 /// format used for encoding pointers in exception handling data. Reason is
544 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
545 /// if the symbol can be relocated.
546 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
549 /// SectionKindForGlobal - This hook allows the target to select proper
550 /// section kind used for global emission.
551 virtual SectionKind::Kind
552 SectionKindForGlobal(const GlobalValue *GV) const;
555 /// SectionFlagsForGlobal - This hook allows the target to select proper
556 /// section flags either for given global or for section.
558 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
559 const char* name = NULL) const;
561 /// SectionForGlobal - This hooks returns proper section name for given
562 /// global with all necessary flags and marks.
563 virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
565 // Helper methods for SectionForGlobal
566 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
567 SectionKind::Kind kind) const;
569 const std::string& getSectionFlags(unsigned Flags) const;
570 virtual std::string printSectionFlags(unsigned flags) const { return ""; }
572 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
574 virtual const Section* SelectSectionForMachineConst(const Type *Ty) const;
576 /// getSLEB128Size - Compute the number of bytes required for a signed
579 static unsigned getSLEB128Size(int Value);
581 /// getULEB128Size - Compute the number of bytes required for an unsigned
584 static unsigned getULEB128Size(unsigned Value);
588 const Section *getTextSection() const {
591 const Section *getDataSection() const {
594 const char *getBSSSection() const {
597 const Section *getBSSSection_() const {
600 const char *getReadOnlySection() const {
601 return ReadOnlySection;
603 const Section *getReadOnlySection_() const {
604 return ReadOnlySection_;
606 const Section *getSmallDataSection() const {
607 return SmallDataSection;
609 const Section *getSmallBSSSection() const {
610 return SmallBSSSection;
612 const Section *getSmallRODataSection() const {
613 return SmallRODataSection;
615 const Section *getTLSDataSection() const {
616 return TLSDataSection;
618 const Section *getTLSBSSSection() const {
619 return TLSBSSSection;
621 const char *getZeroFillDirective() const {
622 return ZeroFillDirective;
624 const char *getNonexecutableStackDirective() const {
625 return NonexecutableStackDirective;
627 bool needsSet() const {
630 const char *getPCSymbol() const {
633 char getSeparatorChar() const {
634 return SeparatorChar;
636 const char *getCommentString() const {
637 return CommentString;
639 const char *getGlobalPrefix() const {
642 const char *getPrivateGlobalPrefix() const {
643 return PrivateGlobalPrefix;
645 const char *getLessPrivateGlobalPrefix() const {
646 return LessPrivateGlobalPrefix;
648 const char *getJumpTableSpecialLabelPrefix() const {
649 return JumpTableSpecialLabelPrefix;
651 const char *getGlobalVarAddrPrefix() const {
652 return GlobalVarAddrPrefix;
654 const char *getGlobalVarAddrSuffix() const {
655 return GlobalVarAddrSuffix;
657 const char *getFunctionAddrPrefix() const {
658 return FunctionAddrPrefix;
660 const char *getFunctionAddrSuffix() const {
661 return FunctionAddrSuffix;
663 const char *getPersonalityPrefix() const {
664 return PersonalityPrefix;
666 const char *getPersonalitySuffix() const {
667 return PersonalitySuffix;
669 bool getNeedsIndirectEncoding() const {
670 return NeedsIndirectEncoding;
672 const char *getInlineAsmStart() const {
673 return InlineAsmStart;
675 const char *getInlineAsmEnd() const {
678 unsigned getAssemblerDialect() const {
679 return AssemblerDialect;
681 const char *getStringConstantPrefix() const {
682 return StringConstantPrefix;
684 const char *getZeroDirective() const {
685 return ZeroDirective;
687 const char *getZeroDirectiveSuffix() const {
688 return ZeroDirectiveSuffix;
690 const char *getAsciiDirective() const {
691 return AsciiDirective;
693 const char *getAscizDirective() const {
694 return AscizDirective;
696 const char *getData8bitsDirective() const {
697 return Data8bitsDirective;
699 const char *getData16bitsDirective() const {
700 return Data16bitsDirective;
702 const char *getData32bitsDirective() const {
703 return Data32bitsDirective;
705 const char *getData64bitsDirective() const {
706 return Data64bitsDirective;
708 const char *getJumpTableDirective() const {
709 return JumpTableDirective;
711 const char *getAlignDirective() const {
712 return AlignDirective;
714 bool getAlignmentIsInBytes() const {
715 return AlignmentIsInBytes;
717 unsigned getTextAlignFillValue() const {
718 return TextAlignFillValue;
720 const char *getSwitchToSectionDirective() const {
721 return SwitchToSectionDirective;
723 const char *getTextSectionStartSuffix() const {
724 return TextSectionStartSuffix;
726 const char *getDataSectionStartSuffix() const {
727 return DataSectionStartSuffix;
729 const char *getSectionEndDirectiveSuffix() const {
730 return SectionEndDirectiveSuffix;
732 const char *getConstantPoolSection() const {
733 return ConstantPoolSection;
735 const char *getJumpTableDataSection() const {
736 return JumpTableDataSection;
738 const char *getCStringSection() const {
739 return CStringSection;
741 const Section *getCStringSection_() const {
742 return CStringSection_;
744 const char *getStaticCtorsSection() const {
745 return StaticCtorsSection;
747 const char *getStaticDtorsSection() const {
748 return StaticDtorsSection;
750 const char *getGlobalDirective() const {
751 return GlobalDirective;
753 const char *getSetDirective() const {
756 const char *getLCOMMDirective() const {
757 return LCOMMDirective;
759 const char *getCOMMDirective() const {
760 return COMMDirective;
762 bool getCOMMDirectiveTakesAlignment() const {
763 return COMMDirectiveTakesAlignment;
765 bool hasDotTypeDotSizeDirective() const {
766 return HasDotTypeDotSizeDirective;
768 const char *getUsedDirective() const {
769 return UsedDirective;
771 const char *getWeakRefDirective() const {
772 return WeakRefDirective;
774 const char *getWeakDefDirective() const {
775 return WeakDefDirective;
777 const char *getHiddenDirective() const {
778 return HiddenDirective;
780 const char *getProtectedDirective() const {
781 return ProtectedDirective;
783 bool isAbsoluteDebugSectionOffsets() const {
784 return AbsoluteDebugSectionOffsets;
786 bool isAbsoluteEHSectionOffsets() const {
787 return AbsoluteEHSectionOffsets;
789 bool hasLEB128() const {
792 bool hasDotLocAndDotFile() const {
793 return HasDotLocAndDotFile;
795 bool doesSupportDebugInformation() const {
796 return SupportsDebugInformation;
798 bool doesSupportExceptionHandling() const {
799 return SupportsExceptionHandling;
801 bool doesDwarfRequireFrameSection() const {
802 return DwarfRequiresFrameSection;
804 const char *getGlobalEHDirective() const {
805 return GlobalEHDirective;
807 bool getSupportsWeakOmittedEHFrame() const {
808 return SupportsWeakOmittedEHFrame;
810 const char *getDwarfSectionOffsetDirective() const {
811 return DwarfSectionOffsetDirective;
813 const char *getDwarfAbbrevSection() const {
814 return DwarfAbbrevSection;
816 const char *getDwarfInfoSection() const {
817 return DwarfInfoSection;
819 const char *getDwarfLineSection() const {
820 return DwarfLineSection;
822 const char *getDwarfFrameSection() const {
823 return DwarfFrameSection;
825 const char *getDwarfPubNamesSection() const {
826 return DwarfPubNamesSection;
828 const char *getDwarfPubTypesSection() const {
829 return DwarfPubTypesSection;
831 const char *getDwarfStrSection() const {
832 return DwarfStrSection;
834 const char *getDwarfLocSection() const {
835 return DwarfLocSection;
837 const char *getDwarfARangesSection() const {
838 return DwarfARangesSection;
840 const char *getDwarfRangesSection() const {
841 return DwarfRangesSection;
843 const char *getDwarfMacInfoSection() const {
844 return DwarfMacInfoSection;
846 const char *getDwarfEHFrameSection() const {
847 return DwarfEHFrameSection;
849 const char *getDwarfExceptionSection() const {
850 return DwarfExceptionSection;
852 const char *const *getAsmCBE() const {