[Alignment][NFC] Use Align with TargetLowering::setPrefLoopAlignment
[llvm-complete.git] / include / llvm / MC / MCAsmInfo.h
blob95c5662835a23f04baecf2ea573f1d2357c5819d
1 //===-- llvm/MC/MCAsmInfo.h - Asm info --------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains a class to be used as the basis for target specific
10 // asm writers. This class primarily takes care of global printing constants,
11 // which are used in very similar ways across all targets.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_MC_MCASMINFO_H
16 #define LLVM_MC_MCASMINFO_H
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/MC/MCDirectives.h"
20 #include "llvm/MC/MCTargetOptions.h"
21 #include <vector>
23 namespace llvm {
25 class MCContext;
26 class MCCFIInstruction;
27 class MCExpr;
28 class MCSection;
29 class MCStreamer;
30 class MCSubtargetInfo;
31 class MCSymbol;
33 namespace WinEH {
35 enum class EncodingType {
36 Invalid, /// Invalid
37 Alpha, /// Windows Alpha
38 Alpha64, /// Windows AXP64
39 ARM, /// Windows NT (Windows on ARM)
40 CE, /// Windows CE ARM, PowerPC, SH3, SH4
41 Itanium, /// Windows x64, Windows Itanium (IA-64)
42 X86, /// Windows x86, uses no CFI, just EH tables
43 MIPS = Alpha,
46 } // end namespace WinEH
48 namespace LCOMM {
50 enum LCOMMType { NoAlignment, ByteAlignment, Log2Alignment };
52 } // end namespace LCOMM
54 /// This class is intended to be used as a base class for asm
55 /// properties and features specific to the target.
56 class MCAsmInfo {
57 protected:
58 //===------------------------------------------------------------------===//
59 // Properties to be set by the target writer, used to configure asm printer.
62 /// Code pointer size in bytes. Default is 4.
63 unsigned CodePointerSize = 4;
65 /// Size of the stack slot reserved for callee-saved registers, in bytes.
66 /// Default is same as pointer size.
67 unsigned CalleeSaveStackSlotSize = 4;
69 /// True if target is little endian. Default is true.
70 bool IsLittleEndian = true;
72 /// True if target stack grow up. Default is false.
73 bool StackGrowsUp = false;
75 /// True if this target has the MachO .subsections_via_symbols directive.
76 /// Default is false.
77 bool HasSubsectionsViaSymbols = false;
79 /// True if this is a MachO target that supports the macho-specific .zerofill
80 /// directive for emitting BSS Symbols. Default is false.
81 bool HasMachoZeroFillDirective = false;
83 /// True if this is a MachO target that supports the macho-specific .tbss
84 /// directive for emitting thread local BSS Symbols. Default is false.
85 bool HasMachoTBSSDirective = false;
87 /// True if this is a non-GNU COFF target. The COFF port of the GNU linker
88 /// doesn't handle associative comdats in the way that we would like to use
89 /// them.
90 bool HasCOFFAssociativeComdats = false;
92 /// True if this is a non-GNU COFF target. For GNU targets, we don't generate
93 /// constants into comdat sections.
94 bool HasCOFFComdatConstants = false;
96 /// This is the maximum possible length of an instruction, which is needed to
97 /// compute the size of an inline asm. Defaults to 4.
98 unsigned MaxInstLength = 4;
100 /// Every possible instruction length is a multiple of this value. Factored
101 /// out in .debug_frame and .debug_line. Defaults to 1.
102 unsigned MinInstAlignment = 1;
104 /// The '$' token, when not referencing an identifier or constant, refers to
105 /// the current PC. Defaults to false.
106 bool DollarIsPC = false;
108 /// This string, if specified, is used to separate instructions from each
109 /// other when on the same line. Defaults to ';'
110 const char *SeparatorString;
112 /// This indicates the comment character used by the assembler. Defaults to
113 /// "#"
114 StringRef CommentString;
116 /// This is appended to emitted labels. Defaults to ":"
117 const char *LabelSuffix;
119 // Print the EH begin symbol with an assignment. Defaults to false.
120 bool UseAssignmentForEHBegin = false;
122 // Do we need to create a local symbol for .size?
123 bool NeedsLocalForSize = false;
125 /// This prefix is used for globals like constant pool entries that are
126 /// completely private to the .s file and should not have names in the .o
127 /// file. Defaults to "L"
128 StringRef PrivateGlobalPrefix;
130 /// This prefix is used for labels for basic blocks. Defaults to the same as
131 /// PrivateGlobalPrefix.
132 StringRef PrivateLabelPrefix;
134 /// This prefix is used for symbols that should be passed through the
135 /// assembler but be removed by the linker. This is 'l' on Darwin, currently
136 /// used for some ObjC metadata. The default of "" meast that for this system
137 /// a plain private symbol should be used. Defaults to "".
138 StringRef LinkerPrivateGlobalPrefix;
140 /// If these are nonempty, they contain a directive to emit before and after
141 /// an inline assembly statement. Defaults to "#APP\n", "#NO_APP\n"
142 const char *InlineAsmStart;
143 const char *InlineAsmEnd;
145 /// These are assembly directives that tells the assembler to interpret the
146 /// following instructions differently. Defaults to ".code16", ".code32",
147 /// ".code64".
148 const char *Code16Directive;
149 const char *Code32Directive;
150 const char *Code64Directive;
152 /// Which dialect of an assembler variant to use. Defaults to 0
153 unsigned AssemblerDialect = 0;
155 /// This is true if the assembler allows @ characters in symbol names.
156 /// Defaults to false.
157 bool AllowAtInName = false;
159 /// If this is true, symbol names with invalid characters will be printed in
160 /// quotes.
161 bool SupportsQuotedNames = true;
163 /// This is true if data region markers should be printed as
164 /// ".data_region/.end_data_region" directives. If false, use "$d/$a" labels
165 /// instead.
166 bool UseDataRegionDirectives = false;
168 /// True if .align is to be used for alignment. Only power-of-two
169 /// alignment is supported.
170 bool UseDotAlignForAlignment = false;
172 //===--- Data Emission Directives -------------------------------------===//
174 /// This should be set to the directive used to get some number of zero bytes
175 /// emitted to the current section. Common cases are "\t.zero\t" and
176 /// "\t.space\t". If this is set to null, the Data*bitsDirective's will be
177 /// used to emit zero bytes. Defaults to "\t.zero\t"
178 const char *ZeroDirective;
180 /// This directive allows emission of an ascii string with the standard C
181 /// escape characters embedded into it. If a target doesn't support this, it
182 /// can be set to null. Defaults to "\t.ascii\t"
183 const char *AsciiDirective;
185 /// If not null, this allows for special handling of zero terminated strings
186 /// on this target. This is commonly supported as ".asciz". If a target
187 /// doesn't support this, it can be set to null. Defaults to "\t.asciz\t"
188 const char *AscizDirective;
190 /// These directives are used to output some unit of integer data to the
191 /// current section. If a data directive is set to null, smaller data
192 /// directives will be used to emit the large sizes. Defaults to "\t.byte\t",
193 /// "\t.short\t", "\t.long\t", "\t.quad\t"
194 const char *Data8bitsDirective;
195 const char *Data16bitsDirective;
196 const char *Data32bitsDirective;
197 const char *Data64bitsDirective;
199 /// If non-null, a directive that is used to emit a word which should be
200 /// relocated as a 64-bit GP-relative offset, e.g. .gpdword on Mips. Defaults
201 /// to nullptr.
202 const char *GPRel64Directive = nullptr;
204 /// If non-null, a directive that is used to emit a word which should be
205 /// relocated as a 32-bit GP-relative offset, e.g. .gpword on Mips or .gprel32
206 /// on Alpha. Defaults to nullptr.
207 const char *GPRel32Directive = nullptr;
209 /// If non-null, directives that are used to emit a word/dword which should
210 /// be relocated as a 32/64-bit DTP/TP-relative offset, e.g. .dtprelword/
211 /// .dtpreldword/.tprelword/.tpreldword on Mips.
212 const char *DTPRel32Directive = nullptr;
213 const char *DTPRel64Directive = nullptr;
214 const char *TPRel32Directive = nullptr;
215 const char *TPRel64Directive = nullptr;
217 /// This is true if this target uses "Sun Style" syntax for section switching
218 /// ("#alloc,#write" etc) instead of the normal ELF syntax (,"a,w") in
219 /// .section directives. Defaults to false.
220 bool SunStyleELFSectionSwitchSyntax = false;
222 /// This is true if this target uses ELF '.section' directive before the
223 /// '.bss' one. It's used for PPC/Linux which doesn't support the '.bss'
224 /// directive only. Defaults to false.
225 bool UsesELFSectionDirectiveForBSS = false;
227 bool NeedsDwarfSectionOffsetDirective = false;
229 //===--- Alignment Information ----------------------------------------===//
231 /// If this is true (the default) then the asmprinter emits ".align N"
232 /// directives, where N is the number of bytes to align to. Otherwise, it
233 /// emits ".align log2(N)", e.g. 3 to align to an 8 byte boundary. Defaults
234 /// to true.
235 bool AlignmentIsInBytes = true;
237 /// If non-zero, this is used to fill the executable space created as the
238 /// result of a alignment directive. Defaults to 0
239 unsigned TextAlignFillValue = 0;
241 //===--- Global Variable Emission Directives --------------------------===//
243 /// This is the directive used to declare a global entity. Defaults to
244 /// ".globl".
245 const char *GlobalDirective;
247 /// True if the expression
248 /// .long f - g
249 /// uses a relocation but it can be suppressed by writing
250 /// a = f - g
251 /// .long a
252 bool SetDirectiveSuppressesReloc = false;
254 /// False if the assembler requires that we use
255 /// \code
256 /// Lc = a - b
257 /// .long Lc
258 /// \endcode
260 /// instead of
262 /// \code
263 /// .long a - b
264 /// \endcode
266 /// Defaults to true.
267 bool HasAggressiveSymbolFolding = true;
269 /// True is .comm's and .lcomms optional alignment is to be specified in bytes
270 /// instead of log2(n). Defaults to true.
271 bool COMMDirectiveAlignmentIsInBytes = true;
273 /// Describes if the .lcomm directive for the target supports an alignment
274 /// argument and how it is interpreted. Defaults to NoAlignment.
275 LCOMM::LCOMMType LCOMMDirectiveAlignmentType = LCOMM::NoAlignment;
277 // True if the target allows .align directives on functions. This is true for
278 // most targets, so defaults to true.
279 bool HasFunctionAlignment = true;
281 /// True if the target has .type and .size directives, this is true for most
282 /// ELF targets. Defaults to true.
283 bool HasDotTypeDotSizeDirective = true;
285 /// True if the target has a single parameter .file directive, this is true
286 /// for ELF targets. Defaults to true.
287 bool HasSingleParameterDotFile = true;
289 /// True if the target has a .ident directive, this is true for ELF targets.
290 /// Defaults to false.
291 bool HasIdentDirective = false;
293 /// True if this target supports the MachO .no_dead_strip directive. Defaults
294 /// to false.
295 bool HasNoDeadStrip = false;
297 /// True if this target supports the MachO .alt_entry directive. Defaults to
298 /// false.
299 bool HasAltEntry = false;
301 /// Used to declare a global as being a weak symbol. Defaults to ".weak".
302 const char *WeakDirective;
304 /// This directive, if non-null, is used to declare a global as being a weak
305 /// undefined symbol. Defaults to nullptr.
306 const char *WeakRefDirective = nullptr;
308 /// True if we have a directive to declare a global as being a weak defined
309 /// symbol. Defaults to false.
310 bool HasWeakDefDirective = false;
312 /// True if we have a directive to declare a global as being a weak defined
313 /// symbol that can be hidden (unexported). Defaults to false.
314 bool HasWeakDefCanBeHiddenDirective = false;
316 /// True if we have a .linkonce directive. This is used on cygwin/mingw.
317 /// Defaults to false.
318 bool HasLinkOnceDirective = false;
320 /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
321 /// hidden visibility. Defaults to MCSA_Hidden.
322 MCSymbolAttr HiddenVisibilityAttr = MCSA_Hidden;
324 /// This attribute, if not MCSA_Invalid, is used to declare an undefined
325 /// symbol as having hidden visibility. Defaults to MCSA_Hidden.
326 MCSymbolAttr HiddenDeclarationVisibilityAttr = MCSA_Hidden;
328 /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having
329 /// protected visibility. Defaults to MCSA_Protected
330 MCSymbolAttr ProtectedVisibilityAttr = MCSA_Protected;
332 //===--- Dwarf Emission Directives -----------------------------------===//
334 /// True if target supports emission of debugging information. Defaults to
335 /// false.
336 bool SupportsDebugInformation = false;
338 /// Exception handling format for the target. Defaults to None.
339 ExceptionHandling ExceptionsType = ExceptionHandling::None;
341 /// Windows exception handling data (.pdata) encoding. Defaults to Invalid.
342 WinEH::EncodingType WinEHEncodingType = WinEH::EncodingType::Invalid;
344 /// True if Dwarf2 output generally uses relocations for references to other
345 /// .debug_* sections.
346 bool DwarfUsesRelocationsAcrossSections = true;
348 /// True if DWARF FDE symbol reference relocations should be replaced by an
349 /// absolute difference.
350 bool DwarfFDESymbolsUseAbsDiff = false;
352 /// True if dwarf register numbers are printed instead of symbolic register
353 /// names in .cfi_* directives. Defaults to false.
354 bool DwarfRegNumForCFI = false;
356 /// True if target uses parens to indicate the symbol variant instead of @.
357 /// For example, foo(plt) instead of foo@plt. Defaults to false.
358 bool UseParensForSymbolVariant = false;
360 /// True if the target supports flags in ".loc" directive, false if only
361 /// location is allowed.
362 bool SupportsExtendedDwarfLocDirective = true;
364 //===--- Prologue State ----------------------------------------------===//
366 std::vector<MCCFIInstruction> InitialFrameState;
368 //===--- Integrated Assembler Information ----------------------------===//
370 /// Should we use the integrated assembler?
371 /// The integrated assembler should be enabled by default (by the
372 /// constructors) when failing to parse a valid piece of assembly (inline
373 /// or otherwise) is considered a bug. It may then be overridden after
374 /// construction (see LLVMTargetMachine::initAsmInfo()).
375 bool UseIntegratedAssembler;
377 /// Preserve Comments in assembly
378 bool PreserveAsmComments;
380 /// Compress DWARF debug sections. Defaults to no compression.
381 DebugCompressionType CompressDebugSections = DebugCompressionType::None;
383 /// True if the integrated assembler should interpret 'a >> b' constant
384 /// expressions as logical rather than arithmetic.
385 bool UseLogicalShr = true;
387 // If true, emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL, on
388 // X86_64 ELF.
389 bool RelaxELFRelocations = true;
391 // If true, then the lexer and expression parser will support %neg(),
392 // %hi(), and similar unary operators.
393 bool HasMipsExpressions = false;
395 public:
396 explicit MCAsmInfo();
397 virtual ~MCAsmInfo();
399 /// Get the code pointer size in bytes.
400 unsigned getCodePointerSize() const { return CodePointerSize; }
402 /// Get the callee-saved register stack slot
403 /// size in bytes.
404 unsigned getCalleeSaveStackSlotSize() const {
405 return CalleeSaveStackSlotSize;
408 /// True if the target is little endian.
409 bool isLittleEndian() const { return IsLittleEndian; }
411 /// True if target stack grow up.
412 bool isStackGrowthDirectionUp() const { return StackGrowsUp; }
414 bool hasSubsectionsViaSymbols() const { return HasSubsectionsViaSymbols; }
416 // Data directive accessors.
418 const char *getData8bitsDirective() const { return Data8bitsDirective; }
419 const char *getData16bitsDirective() const { return Data16bitsDirective; }
420 const char *getData32bitsDirective() const { return Data32bitsDirective; }
421 const char *getData64bitsDirective() const { return Data64bitsDirective; }
422 const char *getGPRel64Directive() const { return GPRel64Directive; }
423 const char *getGPRel32Directive() const { return GPRel32Directive; }
424 const char *getDTPRel64Directive() const { return DTPRel64Directive; }
425 const char *getDTPRel32Directive() const { return DTPRel32Directive; }
426 const char *getTPRel64Directive() const { return TPRel64Directive; }
427 const char *getTPRel32Directive() const { return TPRel32Directive; }
429 /// Targets can implement this method to specify a section to switch to if the
430 /// translation unit doesn't have any trampolines that require an executable
431 /// stack.
432 virtual MCSection *getNonexecutableStackSection(MCContext &Ctx) const {
433 return nullptr;
436 /// True if the section is atomized using the symbols in it.
437 /// This is false if the section is not atomized at all (most ELF sections) or
438 /// if it is atomized based on its contents (MachO' __TEXT,__cstring for
439 /// example).
440 virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const;
442 virtual const MCExpr *getExprForPersonalitySymbol(const MCSymbol *Sym,
443 unsigned Encoding,
444 MCStreamer &Streamer) const;
446 virtual const MCExpr *getExprForFDESymbol(const MCSymbol *Sym,
447 unsigned Encoding,
448 MCStreamer &Streamer) const;
450 /// Return true if the identifier \p Name does not need quotes to be
451 /// syntactically correct.
452 virtual bool isValidUnquotedName(StringRef Name) const;
454 /// Return true if the .section directive should be omitted when
455 /// emitting \p SectionName. For example:
457 /// shouldOmitSectionDirective(".text")
459 /// returns false => .section .text,#alloc,#execinstr
460 /// returns true => .text
461 virtual bool shouldOmitSectionDirective(StringRef SectionName) const;
463 bool usesSunStyleELFSectionSwitchSyntax() const {
464 return SunStyleELFSectionSwitchSyntax;
467 bool usesELFSectionDirectiveForBSS() const {
468 return UsesELFSectionDirectiveForBSS;
471 bool needsDwarfSectionOffsetDirective() const {
472 return NeedsDwarfSectionOffsetDirective;
475 // Accessors.
477 bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
478 bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
479 bool hasCOFFAssociativeComdats() const { return HasCOFFAssociativeComdats; }
480 bool hasCOFFComdatConstants() const { return HasCOFFComdatConstants; }
482 /// Returns the maximum possible encoded instruction size in bytes. If \p STI
483 /// is null, this should be the maximum size for any subtarget.
484 virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI = nullptr) const {
485 return MaxInstLength;
488 unsigned getMinInstAlignment() const { return MinInstAlignment; }
489 bool getDollarIsPC() const { return DollarIsPC; }
490 const char *getSeparatorString() const { return SeparatorString; }
492 /// This indicates the column (zero-based) at which asm comments should be
493 /// printed.
494 unsigned getCommentColumn() const { return 40; }
496 StringRef getCommentString() const { return CommentString; }
497 const char *getLabelSuffix() const { return LabelSuffix; }
499 bool useAssignmentForEHBegin() const { return UseAssignmentForEHBegin; }
500 bool needsLocalForSize() const { return NeedsLocalForSize; }
501 StringRef getPrivateGlobalPrefix() const { return PrivateGlobalPrefix; }
502 StringRef getPrivateLabelPrefix() const { return PrivateLabelPrefix; }
504 bool hasLinkerPrivateGlobalPrefix() const {
505 return !LinkerPrivateGlobalPrefix.empty();
508 StringRef getLinkerPrivateGlobalPrefix() const {
509 if (hasLinkerPrivateGlobalPrefix())
510 return LinkerPrivateGlobalPrefix;
511 return getPrivateGlobalPrefix();
514 const char *getInlineAsmStart() const { return InlineAsmStart; }
515 const char *getInlineAsmEnd() const { return InlineAsmEnd; }
516 const char *getCode16Directive() const { return Code16Directive; }
517 const char *getCode32Directive() const { return Code32Directive; }
518 const char *getCode64Directive() const { return Code64Directive; }
519 unsigned getAssemblerDialect() const { return AssemblerDialect; }
520 bool doesAllowAtInName() const { return AllowAtInName; }
521 bool supportsNameQuoting() const { return SupportsQuotedNames; }
523 bool doesSupportDataRegionDirectives() const {
524 return UseDataRegionDirectives;
527 bool useDotAlignForAlignment() const {
528 return UseDotAlignForAlignment;
531 const char *getZeroDirective() const { return ZeroDirective; }
532 const char *getAsciiDirective() const { return AsciiDirective; }
533 const char *getAscizDirective() const { return AscizDirective; }
534 bool getAlignmentIsInBytes() const { return AlignmentIsInBytes; }
535 unsigned getTextAlignFillValue() const { return TextAlignFillValue; }
536 const char *getGlobalDirective() const { return GlobalDirective; }
538 bool doesSetDirectiveSuppressReloc() const {
539 return SetDirectiveSuppressesReloc;
542 bool hasAggressiveSymbolFolding() const { return HasAggressiveSymbolFolding; }
544 bool getCOMMDirectiveAlignmentIsInBytes() const {
545 return COMMDirectiveAlignmentIsInBytes;
548 LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const {
549 return LCOMMDirectiveAlignmentType;
552 bool hasFunctionAlignment() const { return HasFunctionAlignment; }
553 bool hasDotTypeDotSizeDirective() const { return HasDotTypeDotSizeDirective; }
554 bool hasSingleParameterDotFile() const { return HasSingleParameterDotFile; }
555 bool hasIdentDirective() const { return HasIdentDirective; }
556 bool hasNoDeadStrip() const { return HasNoDeadStrip; }
557 bool hasAltEntry() const { return HasAltEntry; }
558 const char *getWeakDirective() const { return WeakDirective; }
559 const char *getWeakRefDirective() const { return WeakRefDirective; }
560 bool hasWeakDefDirective() const { return HasWeakDefDirective; }
562 bool hasWeakDefCanBeHiddenDirective() const {
563 return HasWeakDefCanBeHiddenDirective;
566 bool hasLinkOnceDirective() const { return HasLinkOnceDirective; }
568 MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr; }
570 MCSymbolAttr getHiddenDeclarationVisibilityAttr() const {
571 return HiddenDeclarationVisibilityAttr;
574 MCSymbolAttr getProtectedVisibilityAttr() const {
575 return ProtectedVisibilityAttr;
578 bool doesSupportDebugInformation() const { return SupportsDebugInformation; }
580 bool doesSupportExceptionHandling() const {
581 return ExceptionsType != ExceptionHandling::None;
584 ExceptionHandling getExceptionHandlingType() const { return ExceptionsType; }
585 WinEH::EncodingType getWinEHEncodingType() const { return WinEHEncodingType; }
587 void setExceptionsType(ExceptionHandling EH) {
588 ExceptionsType = EH;
591 /// Returns true if the exception handling method for the platform uses call
592 /// frame information to unwind.
593 bool usesCFIForEH() const {
594 return (ExceptionsType == ExceptionHandling::DwarfCFI ||
595 ExceptionsType == ExceptionHandling::ARM || usesWindowsCFI());
598 bool usesWindowsCFI() const {
599 return ExceptionsType == ExceptionHandling::WinEH &&
600 (WinEHEncodingType != WinEH::EncodingType::Invalid &&
601 WinEHEncodingType != WinEH::EncodingType::X86);
604 bool doesDwarfUseRelocationsAcrossSections() const {
605 return DwarfUsesRelocationsAcrossSections;
608 bool doDwarfFDESymbolsUseAbsDiff() const { return DwarfFDESymbolsUseAbsDiff; }
609 bool useDwarfRegNumForCFI() const { return DwarfRegNumForCFI; }
610 bool useParensForSymbolVariant() const { return UseParensForSymbolVariant; }
611 bool supportsExtendedDwarfLocDirective() const {
612 return SupportsExtendedDwarfLocDirective;
615 void addInitialFrameState(const MCCFIInstruction &Inst);
617 const std::vector<MCCFIInstruction> &getInitialFrameState() const {
618 return InitialFrameState;
621 /// Return true if assembly (inline or otherwise) should be parsed.
622 bool useIntegratedAssembler() const { return UseIntegratedAssembler; }
624 /// Set whether assembly (inline or otherwise) should be parsed.
625 virtual void setUseIntegratedAssembler(bool Value) {
626 UseIntegratedAssembler = Value;
629 /// Return true if assembly (inline or otherwise) should be parsed.
630 bool preserveAsmComments() const { return PreserveAsmComments; }
632 /// Set whether assembly (inline or otherwise) should be parsed.
633 virtual void setPreserveAsmComments(bool Value) {
634 PreserveAsmComments = Value;
637 DebugCompressionType compressDebugSections() const {
638 return CompressDebugSections;
641 void setCompressDebugSections(DebugCompressionType CompressDebugSections) {
642 this->CompressDebugSections = CompressDebugSections;
645 bool shouldUseLogicalShr() const { return UseLogicalShr; }
647 bool canRelaxRelocations() const { return RelaxELFRelocations; }
648 void setRelaxELFRelocations(bool V) { RelaxELFRelocations = V; }
649 bool hasMipsExpressions() const { return HasMipsExpressions; }
652 } // end namespace llvm
654 #endif // LLVM_MC_MCASMINFO_H