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;
82 void generateCompactUnwindEncodings();
84 void emitCFISections(
bool EH,
bool Debug,
bool SFrame)
override;
87 void visitUsedSymbol(
const MCSymbol &Sym)
override;
103 template <
typename FT,
typename... Args>
105 auto *
F =
new (SpecialFragAllocator.Allocate(
sizeof(FT),
alignof(FT)))
106 FT(std::forward<Args>(
args)...);
107 addSpecialFragment(
F);
111 void ensureHeadroom(
size_t Headroom);
113 void appendContents(
size_t Num,
uint8_t Elt);
122 void emitConditionalAssignment(
MCSymbol *Symbol,
126 void emitULEB128Value(
const MCExpr *
Value)
override;
127 void emitSLEB128Value(
const MCExpr *
Value)
override;
137 void emitValueToAlignment(
Align Alignment, int64_t Fill = 0,
139 unsigned MaxBytesToEmit = 0)
override;
141 unsigned MaxBytesToEmit = 0)
override;
142 void emitPrefAlign(
Align Alignment)
override;
145 void emitDwarfLocDirective(
unsigned FileNo,
unsigned Line,
unsigned Column,
146 unsigned Flags,
unsigned Isa,
147 unsigned Discriminator,
StringRef FileName,
149 void emitDwarfAdvanceLineAddr(int64_t LineDelta,
const MCSymbol *LastLabel,
150 const MCSymbol *Label,
151 unsigned PointerSize)
override;
152 void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel,
153 MCSymbol *EndLabel =
nullptr)
override;
154 void emitDwarfAdvanceFrameAddr(
const MCSymbol *LastLabel,
155 const MCSymbol *Label, SMLoc Loc);
156 void emitSFrameCalculateFuncOffset(
const MCSymbol *FunCabsel,
157 const MCSymbol *FREBegin,
158 MCFragment *FDEFrag, SMLoc Loc);
159 void emitCVLocDirective(
unsigned FunctionId,
unsigned FileNo,
unsigned Line,
160 unsigned Column,
bool PrologueEnd,
bool IsStmt,
161 StringRef FileName, SMLoc Loc)
override;
162 void emitCVLinetableDirective(
unsigned FunctionId,
const MCSymbol *Begin,
163 const MCSymbol *End)
override;
164 void emitCVInlineLinetableDirective(
unsigned PrimaryFunctionId,
165 unsigned SourceFileId,
166 unsigned SourceLineNum,
167 const MCSymbol *FnStartSym,
168 const MCSymbol *FnEndSym)
override;
169 void emitCVDefRangeDirective(
170 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
171 StringRef FixedSizePortion)
override;
172 void emitCVStringTableDirective()
override;
173 void emitCVFileChecksumsDirective()
override;
174 void emitCVFileChecksumOffsetDirective(
unsigned FileNo)
override;
175 void emitRelocDirective(
const MCExpr &Offset, StringRef Name,
176 const MCExpr *Expr, SMLoc Loc = {})
override;
177 using MCStreamer::emitFill;
178 void emitFill(
const MCExpr &NumBytes, uint64_t FillValue,
179 SMLoc Loc = SMLoc())
override;
180 void emitFill(
const MCExpr &NumValues, int64_t
Size, int64_t Expr,
181 SMLoc Loc = SMLoc())
override;
182 void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc,
183 const MCSubtargetInfo &STI)
override;
184 void emitFileDirective(StringRef
Filename)
override;
185 void emitFileDirective(StringRef
Filename, StringRef CompilerVersion,
186 StringRef TimeStamp, StringRef Description)
override;
188 void emitAddrsig()
override;
189 void emitAddrsigSym(
const MCSymbol *Sym)
override;
191 void finishImpl()
override;
202 void emitAbsoluteSymbolDiff(
const MCSymbol *Hi,
const MCSymbol *Lo,
203 unsigned Size)
override;
205 void emitAbsoluteSymbolDiffAsULEB128(
const MCSymbol *Hi,
206 const MCSymbol *Lo)
override;
208 bool mayHaveInstructions(MCSection &Sec)
const override;
212 void emitPendingAssignments(MCSymbol *Symbol);
Context object for machine code objects.