Go to the documentation of this file.
9 #ifndef LLVM_MC_MCELFSTREAMER_H
10 #define LLVM_MC_MCELFSTREAMER_H
23 class MCSubtargetInfo;
25 class MCSymbolRefExpr;
34 std::unique_ptr<MCObjectWriter> OW,
35 std::unique_ptr<MCCodeEmitter> Emitter);
64 bool KeepOriginalSym)
override;
109 bool OverwriteExisting);
111 bool OverwriteExisting);
113 StringRef StringValue,
bool OverwriteExisting);
116 createAttributesSection(Vendor, Section,
Type, AttributeSection,
Contents);
120 AttributeItem *getAttributeItem(
unsigned Attribute);
122 void createAttributesSection(
StringRef Vendor,
const Twine &Section,
133 GNUAttributes.push_back(Item);
137 bool isBundleLocked()
const;
141 void fixSymbolsInTLSFixups(
const MCExpr *expr);
143 void finalizeCGProfile();
148 bool SeenIdent =
false;
156 std::unique_ptr<MCAsmBackend> TAB,
157 std::unique_ptr<MCObjectWriter> OW,
158 std::unique_ptr<MCCodeEmitter> Emitter,
159 bool RelaxAll,
bool IsThumb,
bool IsAndroid);
163 #endif // LLVM_MC_MCELFSTREAMER_H
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
Context object for machine code objects.
void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, unsigned ByteAlignment=0, SMLoc L=SMLoc()) override
Emit the zerofill section and an optional symbol.
void changeSection(MCSection *Section, const MCExpr *Subsection) override
Update streamer for a new active section.
MCELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
The instances of the Type class are immutable: once they are created, they are never changed.
void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0) override
Emit a thread local bss (.tbss) symbol.
@ NumericAndTextAttributes
Instances of this class represent a single low-level machine instruction.
void reset() override
state management
void reset() override
state management
Represents a location in source code.
~MCELFStreamer() override=default
void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count) override
Streaming object file generation interface.
void emitBundleLock(bool AlignToEnd) override
The following instructions are a bundle-locked group.
Flag
These should be considered private to the implementation of the MCInstrDesc class.
void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override
Emit an weak reference from Alias to Symbol.
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit a common symbol.
SmallVector< AttributeItem, 64 > Contents
void emitLabelAtPos(MCSymbol *Symbol, SMLoc Loc, MCFragment *F, uint64_t Offset) override
void emitValueToAlignment(unsigned, int64_t, unsigned, unsigned) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
void emitThumbFunc(MCSymbol *Func) override
Note in the output that the specified Func is a Thumb mode function (ARM target only).
void finishImpl() override
Streamer specific finalization.
void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, bool KeepOriginalSym) override
Emit an ELF .symver directive.
void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit a local common (.lcomm) symbol.
void emitIdent(StringRef IdentString) override
Emit the "identifiers" directive.
void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override
Set the DescValue for the Symbol.
Represent a reference to a symbol from inside an expression.
MCELFStreamer * createARMELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter, bool RelaxAll, bool IsThumb, bool IsAndroid)
void setAttributeItem(unsigned Attribute, unsigned Value, bool OverwriteExisting)
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc()) override
Emit the expression Value into the output as a native integer of the given Size bytes.
StringRef - Represent a constant reference to a string, i.e.
void setAttributeItems(unsigned Attribute, unsigned IntValue, StringRef StringValue, bool OverwriteExisting)
void emitGNUAttribute(unsigned Tag, unsigned Value) override
Emit a .gnu_attribute directive.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
ELF object attributes section emission support.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
void emitBundleAlignMode(unsigned AlignPow2) override
Set the bundle alignment mode from now on in the section.
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
void emitAssemblerFlag(MCAssemblerFlag Flag) override
Note in the output the specified Flag.
enum llvm::MCELFStreamer::AttributeItem::@307 Type
void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override
Emit an ELF .size directive.
void emitBundleUnlock() override
Ends a bundle-locked group.
void initSections(bool NoExecStack, const MCSubtargetInfo &STI) override
Create the default sections and set the initial one.
BlockVerifier::State From
Fragment for data and encoded instructions.
Generic base class for all target subtargets.
LLVM Value Representation.
Base class for the full range of assembler expressions which are needed for parsing.
void emitAttributesSection(StringRef Vendor, const Twine &Section, unsigned Type, MCSection *&AttributeSection)