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