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;
143 void emitDwarfLocDirective(
unsigned FileNo,
unsigned Line,
unsigned Column,
144 unsigned Flags,
unsigned Isa,
145 unsigned Discriminator,
StringRef FileName,
147 void emitDwarfAdvanceLineAddr(int64_t LineDelta,
const MCSymbol *LastLabel,
148 const MCSymbol *Label,
149 unsigned PointerSize)
override;
150 void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel,
151 MCSymbol *EndLabel =
nullptr)
override;
152 void emitDwarfAdvanceFrameAddr(
const MCSymbol *LastLabel,
153 const MCSymbol *Label, SMLoc Loc);
154 void emitSFrameCalculateFuncOffset(
const MCSymbol *FunCabsel,
155 const MCSymbol *FREBegin,
156 MCFragment *FDEFrag, SMLoc Loc);
157 void emitCVLocDirective(
unsigned FunctionId,
unsigned FileNo,
unsigned Line,
158 unsigned Column,
bool PrologueEnd,
bool IsStmt,
159 StringRef FileName, SMLoc Loc)
override;
160 void emitCVLinetableDirective(
unsigned FunctionId,
const MCSymbol *Begin,
161 const MCSymbol *End)
override;
162 void emitCVInlineLinetableDirective(
unsigned PrimaryFunctionId,
163 unsigned SourceFileId,
164 unsigned SourceLineNum,
165 const MCSymbol *FnStartSym,
166 const MCSymbol *FnEndSym)
override;
167 void emitCVDefRangeDirective(
168 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
169 StringRef FixedSizePortion)
override;
170 void emitCVStringTableDirective()
override;
171 void emitCVFileChecksumsDirective()
override;
172 void emitCVFileChecksumOffsetDirective(
unsigned FileNo)
override;
173 void emitRelocDirective(
const MCExpr &Offset, StringRef Name,
174 const MCExpr *Expr, SMLoc Loc = {})
override;
175 using MCStreamer::emitFill;
176 void emitFill(
const MCExpr &NumBytes, uint64_t FillValue,
177 SMLoc Loc = SMLoc())
override;
178 void emitFill(
const MCExpr &NumValues, int64_t
Size, int64_t Expr,
179 SMLoc Loc = SMLoc())
override;
180 void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc,
181 const MCSubtargetInfo &STI)
override;
182 void emitFileDirective(StringRef Filename)
override;
183 void emitFileDirective(StringRef Filename, StringRef CompilerVersion,
184 StringRef TimeStamp, StringRef Description)
override;
186 void emitAddrsig()
override;
187 void emitAddrsigSym(
const MCSymbol *Sym)
override;
189 void finishImpl()
override;
200 void emitAbsoluteSymbolDiff(
const MCSymbol *Hi,
const MCSymbol *Lo,
201 unsigned Size)
override;
203 void emitAbsoluteSymbolDiffAsULEB128(
const MCSymbol *Hi,
204 const MCSymbol *Lo)
override;
206 bool mayHaveInstructions(MCSection &Sec)
const override;
210 void emitPendingAssignments(MCSymbol *Symbol);
Context object for machine code objects.