41 std::unique_ptr<MCAssembler> Assembler;
46 struct PendingAssignment {
74 std::unique_ptr<MCObjectWriter> OW,
75 std::unique_ptr<MCCodeEmitter>
Emitter);
80 void reset()
override;
86 void generateCompactUnwindEncodings();
88 void emitCFISections(
bool EH,
bool Debug,
bool SFrame)
override;
91 void visitUsedSymbol(
const MCSymbol &Sym)
override;
110 template <
typename FT,
typename... Args>
112 auto *
F =
new (SpecialFragAllocator.Allocate(
sizeof(FT),
alignof(FT)))
113 FT(std::forward<Args>(
args)...);
114 addSpecialFragment(
F);
118 void ensureHeadroom(
size_t Headroom);
120 void appendContents(
size_t Num,
uint8_t Elt);
129 void emitConditionalAssignment(
MCSymbol *Symbol,
133 void emitULEB128Value(
const MCExpr *
Value)
override;
134 void emitSLEB128Value(
const MCExpr *
Value)
override;
144 void emitValueToAlignment(
Align Alignment, int64_t Fill = 0,
146 unsigned MaxBytesToEmit = 0)
override;
148 unsigned MaxBytesToEmit = 0)
override;
149 void emitPrefAlign(
Align Alignment,
const MCSymbol &End,
bool EmitNops,
153 void emitDwarfLocDirective(
unsigned FileNo,
unsigned Line,
unsigned Column,
154 unsigned Flags,
unsigned Isa,
155 unsigned Discriminator,
StringRef FileName,
157 void emitDwarfAdvanceLineAddr(int64_t LineDelta,
const MCSymbol *LastLabel,
158 const MCSymbol *Label,
159 unsigned PointerSize)
override;
160 void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel,
161 MCSymbol *EndLabel =
nullptr)
override;
162 void emitDwarfAdvanceFrameAddr(
const MCSymbol *LastLabel,
163 const MCSymbol *Label, SMLoc Loc);
164 void emitSFrameCalculateFuncOffset(
const MCSymbol *FunCabsel,
165 const MCSymbol *FREBegin,
166 MCFragment *FDEFrag, SMLoc Loc);
167 void emitCVLocDirective(
unsigned FunctionId,
unsigned FileNo,
unsigned Line,
168 unsigned Column,
bool PrologueEnd,
bool IsStmt,
169 StringRef FileName, SMLoc Loc)
override;
170 void emitCVLinetableDirective(
unsigned FunctionId,
const MCSymbol *Begin,
171 const MCSymbol *End)
override;
172 void emitCVInlineLinetableDirective(
unsigned PrimaryFunctionId,
173 unsigned SourceFileId,
174 unsigned SourceLineNum,
175 const MCSymbol *FnStartSym,
176 const MCSymbol *FnEndSym)
override;
177 void emitCVDefRangeDirective(
178 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
179 StringRef FixedSizePortion)
override;
180 void emitCVStringTableDirective()
override;
181 void emitCVFileChecksumsDirective()
override;
182 void emitCVFileChecksumOffsetDirective(
unsigned FileNo)
override;
183 void emitRelocDirective(
const MCExpr &Offset, StringRef Name,
184 const MCExpr *Expr, SMLoc Loc = {})
override;
185 using MCStreamer::emitFill;
186 void emitFill(
const MCExpr &NumBytes, uint64_t FillValue,
187 SMLoc Loc = SMLoc())
override;
188 void emitFill(
const MCExpr &NumValues, int64_t
Size, int64_t Expr,
189 SMLoc Loc = SMLoc())
override;
190 void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc,
191 const MCSubtargetInfo &STI)
override;
192 void emitFileDirective(StringRef
Filename)
override;
193 void emitFileDirective(StringRef
Filename, StringRef CompilerVersion,
194 StringRef TimeStamp, StringRef Description)
override;
196 void emitAddrsig()
override;
197 void emitAddrsigSym(
const MCSymbol *Sym)
override;
199 void finishImpl()
override;
210 void emitAbsoluteSymbolDiff(
const MCSymbol *Hi,
const MCSymbol *Lo,
211 unsigned Size)
override;
213 void emitAbsoluteSymbolDiffAsULEB128(
const MCSymbol *Hi,
214 const MCSymbol *Lo)
override;
216 bool mayHaveInstructions(MCSection &Sec)
const override;
220 void emitPendingAssignments(MCSymbol *Symbol);
Context object for machine code objects.