41 std::unique_ptr<MCAssembler> Assembler;
46 struct PendingAssignment {
70 std::unique_ptr<MCObjectWriter> OW,
71 std::unique_ptr<MCCodeEmitter>
Emitter);
76 void reset()
override;
83 void emitCFISections(
bool EH,
bool Debug,
bool SFrame)
override;
86 void visitUsedSymbol(
const MCSymbol &Sym)
override;
102 template <
typename FT,
typename... Args>
104 auto *
F =
new (SpecialFragAllocator.Allocate(
sizeof(FT),
alignof(FT)))
105 FT(std::forward<Args>(
args)...);
106 addSpecialFragment(
F);
110 void ensureHeadroom(
size_t Headroom);
112 void appendContents(
size_t Num,
uint8_t Elt);
121 void emitConditionalAssignment(
MCSymbol *Symbol,
125 void emitULEB128Value(
const MCExpr *
Value)
override;
126 void emitSLEB128Value(
const MCExpr *
Value)
override;
136 void emitValueToAlignment(
Align Alignment, int64_t Fill = 0,
138 unsigned MaxBytesToEmit = 0)
override;
140 unsigned MaxBytesToEmit = 0)
override;
141 void emitPrefAlign(
Align Alignment)
override;
144 void emitDwarfLocDirective(
unsigned FileNo,
unsigned Line,
unsigned Column,
145 unsigned Flags,
unsigned Isa,
146 unsigned Discriminator,
StringRef FileName,
148 void emitDwarfAdvanceLineAddr(int64_t LineDelta,
const MCSymbol *LastLabel,
149 const MCSymbol *Label,
150 unsigned PointerSize)
override;
151 void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel,
152 MCSymbol *EndLabel =
nullptr)
override;
153 void emitDwarfAdvanceFrameAddr(
const MCSymbol *LastLabel,
154 const MCSymbol *Label, SMLoc Loc);
155 void emitSFrameCalculateFuncOffset(
const MCSymbol *FunCabsel,
156 const MCSymbol *FREBegin,
157 MCFragment *FDEFrag, SMLoc Loc);
158 void emitCVLocDirective(
unsigned FunctionId,
unsigned FileNo,
unsigned Line,
159 unsigned Column,
bool PrologueEnd,
bool IsStmt,
160 StringRef FileName, SMLoc Loc)
override;
161 void emitCVLinetableDirective(
unsigned FunctionId,
const MCSymbol *Begin,
162 const MCSymbol *End)
override;
163 void emitCVInlineLinetableDirective(
unsigned PrimaryFunctionId,
164 unsigned SourceFileId,
165 unsigned SourceLineNum,
166 const MCSymbol *FnStartSym,
167 const MCSymbol *FnEndSym)
override;
168 void emitCVDefRangeDirective(
169 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
170 StringRef FixedSizePortion)
override;
171 void emitCVStringTableDirective()
override;
172 void emitCVFileChecksumsDirective()
override;
173 void emitCVFileChecksumOffsetDirective(
unsigned FileNo)
override;
174 void emitRelocDirective(
const MCExpr &Offset, StringRef Name,
175 const MCExpr *Expr, SMLoc Loc = {})
override;
176 using MCStreamer::emitFill;
177 void emitFill(
const MCExpr &NumBytes, uint64_t FillValue,
178 SMLoc Loc = SMLoc())
override;
179 void emitFill(
const MCExpr &NumValues, int64_t
Size, int64_t Expr,
180 SMLoc Loc = SMLoc())
override;
181 void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc,
182 const MCSubtargetInfo &STI)
override;
183 void emitFileDirective(StringRef
Filename)
override;
184 void emitFileDirective(StringRef
Filename, StringRef CompilerVersion,
185 StringRef TimeStamp, StringRef Description)
override;
187 void emitAddrsig()
override;
188 void emitAddrsigSym(
const MCSymbol *Sym)
override;
190 void finishImpl()
override;
201 void emitAbsoluteSymbolDiff(
const MCSymbol *Hi,
const MCSymbol *Lo,
202 unsigned Size)
override;
204 void emitAbsoluteSymbolDiffAsULEB128(
const MCSymbol *Hi,
205 const MCSymbol *Lo)
override;
207 bool mayHaveInstructions(MCSection &Sec)
const override;
211 void emitPendingAssignments(MCSymbol *Symbol);
Context object for machine code objects.