15#ifndef LLVM_MC_MCASMINFO_H 
   16#define LLVM_MC_MCASMINFO_H 
  474  virtual const MCExpr *getExprForPersonalitySymbol(
const MCSymbol *Sym,
 
  483  virtual bool isAcceptableChar(
char C) 
const;
 
  487  virtual bool isValidUnquotedName(
StringRef Name) 
const;
 
  722  std::optional<uint32_t> getSpecifierForName(
StringRef Name) 
const;
 
 
This file defines the StringMap class.
 
static void printExpr(const MCExpr *Expr, const MCAsmInfo *MAI, raw_ostream &OS)
 
This file defines the DenseMap class.
 
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
 
StringRef getPrivateGlobalPrefix() const
 
MCAsmInfo(MCAsmInfo const &)=delete
 
const char * Data16bitsDirective
 
bool hasCOFFAssociativeComdats() const
 
bool NeedsDwarfSectionOffsetDirective
 
const char * getLabelSuffix() const
 
void setAllowAtInName(bool V)
 
MCSymbolAttr ExportedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having exported visibility.
 
bool preserveAsmComments() const
Return true if assembly (inline or otherwise) should be parsed.
 
bool supportsSignedData() const
 
const char * getInlineAsmStart() const
 
bool hasDotTypeDotSizeDirective() const
 
bool isLittleEndian() const
True if the target is little endian.
 
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
 
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
 
bool AllowAdditionalComments
This indicates whether to allow additional "comment strings" to be lexed as a comment.
 
bool useAtForSpecifier() const
 
unsigned TextAlignFillValue
If non-zero, this is used to fill the executable space created as the result of a alignment directive...
 
bool AllowQuestionAtStartOfIdentifier
This is true if the assembler allows the "?" character at the start of of a string to be lexed as an ...
 
bool useIntegratedAssembler() const
Return true if assembly (inline or otherwise) should be parsed.
 
bool UseAtForSpecifier
True if target uses @ (expr@specifier) for relocation specifiers.
 
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
 
virtual void printSpecifierExpr(raw_ostream &, const MCSpecifierExpr &) const
 
bool HasFunctionAlignment
 
const char * AsciiDirective
This directive allows emission of an ascii string with the standard C escape characters embedded into...
 
std::vector< MCCFIInstruction > InitialFrameState
 
llvm::StringMap< uint32_t > NameToAtSpecifier
 
MCAsmInfo & operator=(MCAsmInfo const &)=delete
 
void initializeAtSpecifiers(ArrayRef< AtSpecifier >)
 
MCSymbolAttr getProtectedVisibilityAttr() const
 
bool usesSunStyleELFSectionSwitchSyntax() const
 
bool doesAllowDollarAtStartOfIdentifier() const
 
virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI=nullptr) const
Returns the maximum possible encoded instruction size in bytes.
 
unsigned getMinInstAlignment() const
 
bool hasLEB128Directives() const
 
bool doesSupportDataRegionDirectives() const
 
MCSymbolAttr getExportedVisibilityAttr() const
 
bool usesSetToEquateSymbol() const
 
bool HasSubsectionsViaSymbols
True if this target has the MachO .subsections_via_symbols directive.
 
const char * getData32bitsDirective() const
 
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
 
const char * Data64bitsDirective
 
const std::vector< MCCFIInstruction > & getInitialFrameState() const
 
bool useFullRegisterNames() const
 
llvm::DenseMap< uint32_t, StringRef > AtSpecifierToName
 
unsigned getAssemblerDialect() const
 
virtual void setUseIntegratedAssembler(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
 
bool DollarIsPC
The '$' token, when not referencing an identifier or constant, refers to the current PC.
 
const char * getInlineAsmEnd() const
 
unsigned getTextAlignFillValue() const
 
StringRef getLinkerPrivateGlobalPrefix() const
 
bool doesAllowAtInName() const
 
bool useDwarfRegNumForCFI() const
 
bool useAssignmentForEHBegin() const
 
bool usesCFIWithoutEH() const
 
bool supportsExtendedDwarfLocDirective() const
 
bool AvoidWeakIfComdat
True if we should mark symbols as global instead of weak, for weak*/linkonce*, if the symbol has a c...
 
StringRef getPrivateLabelPrefix() const
 
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
 
bool AllowDollarAtStartOfIdentifier
This is true if the assembler allows the "$" character at the start of of a string to be lexed as an ...
 
bool PreserveAsmComments
Preserve Comments in assembly.
 
const char * LabelSuffix
This is appended to emitted labels. Defaults to ":".
 
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
 
bool DwarfFDESymbolsUseAbsDiff
True if DWARF FDE symbol reference relocations should be replaced by an absolute difference.
 
const char * getData8bitsDirective() const
 
const char * getData64bitsDirective() const
 
AsmCharLiteralSyntax characterLiteralSyntax() const
 
bool avoidWeakIfComdat() const
 
bool SetDirectiveSuppressesReloc
True if the expression .long f - g uses a relocation but it can be suppressed by writing a = f - g ....
 
const char * Data32bitsDirective
 
bool UseIntegratedAssembler
Should we use the integrated assembler?
 
bool shouldUseMotorolaIntegers() const
 
bool supportsNameQuoting() const
 
bool AllowAtAtStartOfIdentifier
This is true if the assembler allows the "@" character at the start of a string to be lexed as an Asm...
 
bool UsesSetToEquateSymbol
Use .set instead of = to equate a symbol to an expression.
 
bool UseLogicalShr
True if the integrated assembler should interpret 'a >> b' constant expressions as logical rather tha...
 
MCSymbolAttr getHiddenDeclarationVisibilityAttr() const
 
const char * GlobalDirective
This is the directive used to declare a global entity.
 
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
 
bool hasWeakDefCanBeHiddenDirective() const
 
WinEH::EncodingType WinEHEncodingType
Windows exception handling data (.pdata) encoding. Defaults to Invalid.
 
bool HasCOFFComdatConstants
True if this is a non-GNU COFF target.
 
virtual void setPreserveAsmComments(bool Value)
Set whether assembly (inline or otherwise) should be parsed.
 
bool hasLinkerPrivateGlobalPrefix() const
 
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
 
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
 
LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const
 
bool needsDwarfSectionOffsetDirective() const
 
bool shouldUseLogicalShr() const
 
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
 
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind.
 
bool AllowAtInName
This is true if the assembler allows @ characters in symbol names.
 
unsigned CommentColumn
The column (zero-based) at which asm comments should be printed.
 
virtual void printSwitchToSection(const MCSection &, uint32_t Subsection, const Triple &, raw_ostream &) const
 
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
 
bool HasWeakDefCanBeHiddenDirective
True if we have a directive to declare a global as being a weak defined symbol that can be hidden (un...
 
StringRef getCommentString() const
 
bool UseParensForSpecifier
(ARM-specific) Uses parens for relocation specifier in data directives, e.g.
 
const char * getAscizDirective() const
 
bool SunStyleELFSectionSwitchSyntax
This is true if this target uses "Sun Style" syntax for section switching ("#alloc,...
 
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
 
bool UseAssignmentForEHBegin
 
bool HasCOFFAssociativeComdats
True if this is a non-GNU COFF target.
 
bool doesSupportDebugInformation() const
 
bool doesSetDirectiveSuppressReloc() const
 
bool ParseInlineAsmUsingAsmParser
Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
 
WinEH::EncodingType getWinEHEncodingType() const
 
bool doesDwarfUseRelocationsAcrossSections() const
 
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
 
virtual void setParseInlineAsmUsingAsmParser(bool Value)
Set whether target want to use AsmParser to parse inlineasm.
 
const char * getZeroDirective() const
 
bool EnableDwarfFileDirectoryDefault
True if DWARF ‘.file directory’ directive syntax is used by default.
 
StringRef LinkerPrivateGlobalPrefix
This prefix is used for symbols that should be passed through the assembler but be removed by the lin...
 
bool SupportsDebugInformation
True if target supports emission of debugging information.
 
void setFullRegisterNames(bool V)
 
const char * getWeakDirective() const
 
bool StackGrowsUp
True if target stack grow up. Default is false.
 
bool hasSubsectionsViaSymbols() const
 
bool PPCUseFullRegisterNames
True if full register names are printed.
 
const char * InlineAsmEnd
 
const char * getData16bitsDirective() const
 
const char * getSeparatorString() const
 
bool SupportsSignedData
True if data directives support signed values.
 
bool doesAllowAtAtStartOfIdentifier() const
 
bool getCOMMDirectiveAlignmentIsInBytes() const
 
bool isStackGrowthDirectionUp() const
True if target stack grow up.
 
virtual bool useCodeAlign(const MCSection &Sec) const
 
bool useParensForSpecifier() const
 
unsigned AssemblerDialect
Which dialect of an assembler variant to use. Defaults to 0.
 
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line.
 
virtual MCSection * getStackSection(MCContext &Ctx, bool Exec) const
Targets can implement this method to specify a section to switch to depending on whether the translat...
 
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
 
bool shouldAllowAdditionalComments() const
 
unsigned getCalleeSaveStackSlotSize() const
Get the callee-saved register stack slot size in bytes.
 
bool UsesCFIWithoutEH
True if target uses CFI unwind information for other purposes than EH (debugging / sanitizers) when E...
 
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
 
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
 
bool parseInlineAsmUsingAsmParser() const
Return true if target want to use AsmParser to parse inlineasm.
 
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
 
void setBinutilsVersion(std::pair< int, int > Value)
 
bool doDwarfFDESymbolsUseAbsDiff() const
 
const char * getGlobalDirective() const
 
void setExceptionsType(ExceptionHandling EH)
 
bool doesAllowQuestionAtStartOfIdentifier() const
 
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
 
bool getAlignmentIsInBytes() const
 
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
 
bool usesWindowsCFI() const
 
bool usesELFSectionDirectiveForBSS() const
 
AsmCharLiteralSyntax CharacterLiteralSyntax
Form used for character literals in the assembly syntax.
 
bool getDollarIsPC() const
 
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
 
bool binutilsIsAtLeast(int Major, int Minor) const
 
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
 
unsigned getCommentColumn() const
 
MCSymbolAttr getHiddenVisibilityAttr() const
 
bool SupportsQuotedNames
If this is true, symbol names with invalid characters will be printed in quotes.
 
bool hasSingleParameterDotFile() const
 
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
 
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives.
 
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in ....
 
const char * getAsciiDirective() const
 
bool IsLittleEndian
True if target is little endian. Default is true.
 
AsmCharLiteralSyntax
Assembly character literal syntax types.
 
@ ACLS_SingleQuotePrefix
Unknown; character literals not used by LLVM for this target.
 
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
 
std::pair< int, int > BinutilsVersion
 
bool HasLEB128Directives
True if the target supports LEB128 directives.
 
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
 
const char * getWeakRefDirective() const
 
bool hasCOFFComdatConstants() const
 
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
 
bool hasNoDeadStrip() const
 
ExceptionHandling getExceptionHandlingType() const
 
StringRef CommentString
This indicates the comment string used by the assembler.
 
bool needsLocalForSize() const
 
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
 
void setCommentColumn(unsigned Col)
 
bool hasFunctionAlignment() const
 
bool enableDwarfFileDirectoryDefault() const
 
bool usesDwarfFileAndLocDirectives() const
 
bool hasIdentDirective() const
 
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
 
Context object for machine code objects.
 
Base class for the full range of assembler expressions which are needed for parsing.
 
Instances of this class represent a uniqued identifier for a section in the current translation unit.
 
Extension point for target-specific MCExpr subclasses with a relocation specifier,...
 
Streaming machine code generation interface.
 
Generic base class for all target subtargets.
 
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
 
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
 
StringRef - Represent a constant reference to a string, i.e.
 
Triple - Helper class for working with autoconf configuration names.
 
LLVM Value Representation.
 
This class implements an extremely fast bulk output stream that can only output to a stream.
 
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
 
@ C
The default llvm calling convention, compatible with C.
 
@ MIPS
Windows x86, uses no CFI, just EH tables.
 
@ Itanium
Windows CE ARM, PowerPC, SH3, SH4.
 
@ CE
Windows NT (Windows on ARM)
 
@ X86
Windows x64, Windows Itanium (IA-64)
 
This is an optimization pass for GlobalISel generic memory operations.
 
@ ZOS
z/OS MVS Exception Handling.
 
@ None
No exception support.
 
@ DwarfCFI
DWARF-like instruction based exceptions.
 
@ WinEH
Windows Exception Handling.
 
@ MCSA_Protected
.protected (ELF)
 
@ MCSA_Exported
.globl _foo, exported (XCOFF)
 
@ MCSA_Hidden
.hidden (ELF)