9#ifndef LLVM_MC_MCELFSTREAMER_H
10#define LLVM_MC_MCELFSTREAMER_H
35 std::unique_ptr<MCObjectWriter> OW,
36 std::unique_ptr<MCCodeEmitter>
Emitter);
62 Align ByteAlignment)
override;
66 bool KeepOriginalSym)
override;
69 Align ByteAlignment)
override;
103 NumericAndTextAttributes
113 bool OverwriteExisting);
115 bool OverwriteExisting);
117 StringRef StringValue,
bool OverwriteExisting);
120 createAttributesSection(Vendor, Section,
Type, AttributeSection,
Contents);
124 AttributeItem *getAttributeItem(
unsigned Attribute);
126 void createAttributesSection(
StringRef Vendor,
const Twine &Section,
141 bool isBundleLocked()
const;
145 void fixSymbolsInTLSFixups(
const MCExpr *expr);
147 void finalizeCGProfile();
149 bool SeenIdent =
false;
153 std::unique_ptr<MCAsmBackend> TAB,
154 std::unique_ptr<MCObjectWriter> OW,
155 std::unique_ptr<MCCodeEmitter>
Emitter,
156 bool IsThumb,
bool IsAndroid);
BlockVerifier::State From
dxil DXContainer Global Emitter
This file defines the SmallVector class.
Context object for machine code objects.
Fragment for data and encoded instructions.
void emitBundleLock(bool AlignToEnd) override
The following instructions are a bundle-locked group.
SmallVector< AttributeItem, 64 > Contents
void emitAttributesSection(StringRef Vendor, const Twine &Section, unsigned Type, MCSection *&AttributeSection)
void emitValueToAlignment(Align, int64_t, unsigned, unsigned) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
void changeSection(MCSection *Section, uint32_t Subsection=0) override
This is called by popSection and switchSection, if the current section changes.
void emitIdent(StringRef IdentString) override
Emit the "identifiers" directive.
void setAttributeItems(unsigned Attribute, unsigned IntValue, StringRef StringValue, bool OverwriteExisting)
void emitBundleUnlock() override
Ends a bundle-locked group.
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) override
Emit a common symbol.
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.
void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) override
Emit a local common (.lcomm) symbol.
void emitAssemblerFlag(MCAssemblerFlag Flag) override
Note in the output the specified Flag.
void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override
Set the DescValue for the Symbol.
void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override
Emit an ELF .size directive.
void emitThumbFunc(MCSymbol *Func) override
Note in the output that the specified Func is a Thumb mode function (ARM target only).
void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, bool KeepOriginalSym) override
Emit an ELF .symver directive.
~MCELFStreamer() override=default
void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count) override
ELFObjectWriter & getWriter()
void emitGNUAttribute(unsigned Tag, unsigned Value) override
Emit a .gnu_attribute directive.
void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, Align ByteAlignment=Align(1), SMLoc L=SMLoc()) override
Emit the zerofill section and an optional symbol.
void setAttributeItem(unsigned Attribute, unsigned Value, bool OverwriteExisting)
void finishImpl() final
Streamer specific finalization.
void reset() override
state management
void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override
Emit an weak reference from Alias to Symbol.
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
void emitBundleAlignMode(Align Alignment) 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 emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, Align ByteAlignment=Align(1)) override
Emit a thread local bss (.tbss) symbol.
void initSections(bool NoExecStack, const MCSubtargetInfo &STI) override
Create the default sections and set the initial one.
void emitLabelAtPos(MCSymbol *Symbol, SMLoc Loc, MCDataFragment &F, uint64_t Offset) override
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a single low-level machine instruction.
Streaming object file generation interface.
void reset() override
state management
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Generic base class for all target subtargets.
Represent a reference to a symbol from inside an expression.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Represents a location in source code.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
MCELFStreamer * createARMELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter, bool IsThumb, bool IsAndroid)
This struct is a compact representation of a valid (non-zero power of two) alignment.
ELF object attributes section emission support.