26 std::size_t Pos = CSectionName.
find(
".text");
28 if (Pos != std::string::npos) {
54 bool SwitchLiteralSection,
SMLoc L) {
58 LiteralStr <<
"\t.literal " << LblSym->
getName() <<
", ";
60 if (
auto CE = dyn_cast<MCConstantExpr>(
Value)) {
61 LiteralStr << CE->getValue() <<
"\n";
62 }
else if (
auto SRE = dyn_cast<MCSymbolRefExpr>(
Value)) {
64 LiteralStr <<
Sym.getName() <<
"\n";
69 OS << LiteralStr.
str();
73 OS <<
"\t.literal_position\n";
84 bool SwitchLiteralSection,
SMLoc L) {
86 if (SwitchLiteralSection) {
101 if (SwitchLiteralSection) {
static std::string getLiteralSectionName(StringRef CSectionName)
Context object for machine code objects.
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Base class for the full range of assembler expressions which are needed for parsing.
This represents a section on linux, lots of unix variants and some bare metal systems.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
void setAlignment(Align Value)
StringRef getName() const
Streaming machine code generation interface.
bool popSection()
Restore the current and previous section from the section stack.
MCContext & getContext() const
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
void pushSection()
Save the current and previous section on the section stack.
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
MCSection * getCurrentSectionOnly() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringRef getName() const
getName - Get the symbol name.
Target specific streamer interface.
Represents a location in source code.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
bool consume_front(StringRef Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
size_t find(char C, size_t From=0) const
Search for the first character C in the string.
LLVM Value Representation.
void emitLiteralPosition() override
XtensaTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitLiteral(MCSymbol *LblSym, const MCExpr *Value, bool SwitchLiteralSection, SMLoc L) override
void startLiteralSection(MCSection *Section) override
MCELFStreamer & getStreamer()
void emitLiteral(MCSymbol *LblSym, const MCExpr *Value, bool SwitchLiteralSection, SMLoc L) override
void startLiteralSection(MCSection *Section) override
XtensaTargetELFStreamer(MCStreamer &S)
XtensaTargetStreamer(MCStreamer &S)
A raw_ostream that writes to an SmallVector or SmallString.
StringRef str() const
Return a StringRef for the vector contents.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.