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