LLVM: lib/MC/MCAsmInfo.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
23
24using namespace llvm;
25
26namespace {
28}
31 cl::desc("Disable emission of the extended flags in .loc directives."),
35
36namespace llvm {
40 "Disable the usage of LEB128 directives, and generate .byte instead."),
42}
43
71
73
77
80 unsigned Encoding,
83}
84
87 unsigned Encoding,
91
94 MCSymbol *PCSym = Context.createTempSymbol();
98}
99
101 if (C == '@')
103
104 return isAlnum(C) || C == '_' || C == '$' || C == '.';
105}
106
108 if (Name.empty())
109 return false;
110
111
112
113 for (char C : Name) {
115 return false;
116 }
117
118 return true;
119}
120
126
129 for (auto Desc : Descs) {
130 [[maybe_unused]] auto It =
132 assert(It.second && "duplicate Kind");
133 [[maybe_unused]] auto It2 =
136 }
137}
138
142 "ensure the specifier is set in initializeVariantKinds");
143 return It->second;
144}
145
149 return It->second;
150 return {};
151}
152
156 else
157 Expr.print(OS, this);
158}
159
163 if (!E.getSubExpr()->evaluateAsRelocatable(Res, Asm))
164 return false;
165
168}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define clEnumVal(ENUMVAL, DESC)
This file contains constants used for implementing Dwarf debug support.
static cl::opt< DefaultOnOff > DwarfExtendedLoc("dwarf-extended-loc", cl::Hidden, cl::desc("Disable emission of the extended flags in .loc directives."), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default))
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
const char * Data16bitsDirective
void addInitialFrameState(const MCCFIInstruction &Inst)
Definition MCAsmInfo.cpp:74
virtual void printSpecifierExpr(raw_ostream &, const MCSpecifierExpr &) const
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
void initializeAtSpecifiers(ArrayRef< AtSpecifier >)
Definition MCAsmInfo.cpp:127
const char * Data8bitsDirective
These directives are used to output some unit of integer data to the current section.
const char * Data64bitsDirective
llvm::DenseMap< uint32_t, StringRef > AtSpecifierToName
virtual bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &Res, const MCAssembler *Asm) const
Definition MCAsmInfo.cpp:160
bool doesAllowAtInName() const
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 ....
StringRef getSpecifierName(uint32_t S) const
Definition MCAsmInfo.cpp:139
const char * Data32bitsDirective
bool UseIntegratedAssembler
Should we use the integrated assembler?
const char * GlobalDirective
This is the directive used to declare a global entity.
std::optional< uint32_t > getSpecifierForName(StringRef Name) const
Definition MCAsmInfo.cpp:146
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
void printExpr(raw_ostream &, const MCExpr &) const
Definition MCAsmInfo.cpp:153
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
bool ParseInlineAsmUsingAsmParser
Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
StringRef LinkerPrivateGlobalPrefix
This prefix is used for symbols that should be passed through the assembler but be removed by the lin...
virtual const MCExpr * getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Definition MCAsmInfo.cpp:86
bool PPCUseFullRegisterNames
True if full register names are printed.
const char * InlineAsmEnd
virtual bool isAcceptableChar(char C) const
Return true if C is an acceptable character inside a symbol name.
Definition MCAsmInfo.cpp:100
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line.
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
Definition MCAsmInfo.cpp:121
bool usesELFSectionDirectiveForBSS() const
MCAsmInfo()
Definition MCAsmInfo.cpp:44
bool SupportsExtendedDwarfLocDirective
True if the target supports flags in ".loc" directive, false if only location is allowed.
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
const char * AscizDirective
If not null, this allows for special handling of zero terminated strings on this target.
virtual const MCExpr * getExprForPersonalitySymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const
Definition MCAsmInfo.cpp:79
bool HasLEB128Directives
True if the target supports LEB128 directives.
virtual bool isValidUnquotedName(StringRef Name) const
Return true if the identifier Name does not need quotes to be syntactically correct.
Definition MCAsmInfo.cpp:107
StringRef CommentString
This indicates the comment string used by the assembler.
const char * WeakDirective
Used to declare a global as being a weak symbol. Defaults to ".weak".
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
Extension point for target-specific MCExpr subclasses with a relocation specifier,...
Streaming machine code generation interface.
MCContext & getContext() const
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void setSpecifier(uint32_t S)
const MCSymbol * getSubSym() const
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
bool isAlnum(char C)
Checks whether character C is either a decimal digit or an uppercase or lowercase letter as classifie...
cl::opt< cl::boolOrDefault > UseLEB128Directives("use-leb128-directives", cl::Hidden, cl::desc("Disable the usage of LEB128 directives, and generate .byte instead."), cl::init(cl::BOU_UNSET))
@ Default
The result values are uniform if and only if all operands are uniform.