LLVM  16.0.0git
MCObjectStreamer.h
Go to the documentation of this file.
1 //===- MCObjectStreamer.h - MCStreamer Object File Interface ----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_MC_MCOBJECTSTREAMER_H
10 #define LLVM_MC_MCOBJECTSTREAMER_H
11 
12 #include "llvm/ADT/SetVector.h"
13 #include "llvm/ADT/SmallVector.h"
14 #include "llvm/MC/MCFixup.h"
15 #include "llvm/MC/MCFragment.h"
16 #include "llvm/MC/MCSection.h"
17 #include "llvm/MC/MCStreamer.h"
18 
19 namespace llvm {
20 class MCContext;
21 class MCInst;
22 class MCObjectWriter;
23 class MCSymbol;
24 struct MCDwarfFrameInfo;
25 class MCAssembler;
26 class MCCodeEmitter;
27 class MCSubtargetInfo;
28 class MCExpr;
29 class MCFragment;
30 class MCDataFragment;
31 class MCAsmBackend;
32 class raw_ostream;
33 class raw_pwrite_stream;
34 
35 /// Streaming object file generation interface.
36 ///
37 /// This class provides an implementation of the MCStreamer interface which is
38 /// suitable for use with the assembler backend. Specific object file formats
39 /// are expected to subclass this interface to implement directives specific
40 /// to that file format or custom semantics expected by the object writer
41 /// implementation.
42 class MCObjectStreamer : public MCStreamer {
43  std::unique_ptr<MCAssembler> Assembler;
44  MCSection::iterator CurInsertionPoint;
45  bool EmitEHFrame;
46  bool EmitDebugFrame;
47  SmallVector<MCSymbol *, 2> PendingLabels;
48  SmallSetVector<MCSection *, 4> PendingLabelSections;
49  unsigned CurSubsectionIdx;
50  struct PendingMCFixup {
51  const MCSymbol *Sym;
52  MCFixup Fixup;
54  PendingMCFixup(const MCSymbol *McSym, MCDataFragment *F, MCFixup McFixup)
55  : Sym(McSym), Fixup(McFixup), DF(F) {}
56  };
57  SmallVector<PendingMCFixup, 2> PendingFixups;
58 
59  struct PendingAssignment {
61  const MCExpr *Value;
62  };
63 
64  /// A list of conditional assignments we may need to emit if the target
65  /// symbol is later emitted.
67  pendingAssignments;
68 
69  virtual void emitInstToData(const MCInst &Inst, const MCSubtargetInfo&) = 0;
70  void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override;
71  void emitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override;
72  MCSymbol *emitCFILabel() override;
73  void emitInstructionImpl(const MCInst &Inst, const MCSubtargetInfo &STI);
74  void resolvePendingFixups();
75 
76 protected:
77  MCObjectStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,
78  std::unique_ptr<MCObjectWriter> OW,
79  std::unique_ptr<MCCodeEmitter> Emitter);
81 
82 public:
83  /// state management
84  void reset() override;
85 
86  /// Object streamers require the integrated assembler.
87  bool isIntegratedAssemblerRequired() const override { return true; }
88 
89  void emitFrames(MCAsmBackend *MAB);
90  void emitCFISections(bool EH, bool Debug) override;
91 
93 
94  void insert(MCFragment *F) {
96  MCSection *CurSection = getCurrentSectionOnly();
97  CurSection->getFragmentList().insert(CurInsertionPoint, F);
98  F->setParent(CurSection);
99  }
100 
101  /// Get a data fragment to write into, creating a new one if the current
102  /// fragment is not a data fragment.
103  /// Optionally a \p STI can be passed in so that a new fragment is created
104  /// if the Subtarget differs from the current fragment.
106 
107 protected:
108  bool changeSectionImpl(MCSection *Section, const MCExpr *Subsection);
109 
110  /// Assign a label to the current Section and Subsection even though a
111  /// fragment is not yet present. Use flushPendingLabels(F) to associate
112  /// a fragment with this label.
113  void addPendingLabel(MCSymbol* label);
114 
115  /// If any labels have been emitted but not assigned fragments in the current
116  /// Section and Subsection, ensure that they get assigned, either to fragment
117  /// F if possible or to a new data fragment. Optionally, one can provide an
118  /// offset \p FOffset as a symbol offset within the fragment.
119  void flushPendingLabels(MCFragment *F, uint64_t FOffset = 0);
120 
121 public:
122  void visitUsedSymbol(const MCSymbol &Sym) override;
123 
124  /// Create a data fragment for any pending labels across all Sections
125  /// and Subsections.
126  void flushPendingLabels();
127 
128  MCAssembler &getAssembler() { return *Assembler; }
129  MCAssembler *getAssemblerPtr() override;
130  /// \name MCStreamer Interface
131  /// @{
132 
133  void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
134  virtual void emitLabelAtPos(MCSymbol *Symbol, SMLoc Loc, MCFragment *F,
135  uint64_t Offset);
136  void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
138  const MCExpr *Value) override;
139  void emitValueImpl(const MCExpr *Value, unsigned Size,
140  SMLoc Loc = SMLoc()) override;
141  void emitULEB128Value(const MCExpr *Value) override;
142  void emitSLEB128Value(const MCExpr *Value) override;
143  void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override;
144  void changeSection(MCSection *Section, const MCExpr *Subsection) override;
145  void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override;
146 
147  /// Emit an instruction to a special fragment, because this instruction
148  /// can change its size during relaxation.
149  virtual void emitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &);
150 
151  void emitBundleAlignMode(unsigned AlignPow2) override;
152  void emitBundleLock(bool AlignToEnd) override;
153  void emitBundleUnlock() override;
154  void emitBytes(StringRef Data) override;
155  void emitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
156  unsigned ValueSize = 1,
157  unsigned MaxBytesToEmit = 0) override;
158  void emitCodeAlignment(unsigned ByteAlignment, const MCSubtargetInfo *STI,
159  unsigned MaxBytesToEmit = 0) override;
160  void emitValueToOffset(const MCExpr *Offset, unsigned char Value,
161  SMLoc Loc) override;
162  void emitDwarfLocDirective(unsigned FileNo, unsigned Line, unsigned Column,
163  unsigned Flags, unsigned Isa,
164  unsigned Discriminator,
165  StringRef FileName) override;
166  void emitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel,
167  const MCSymbol *Label,
168  unsigned PointerSize) override;
169  void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel) override;
170  void emitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
171  const MCSymbol *Label);
172  void emitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line,
173  unsigned Column, bool PrologueEnd, bool IsStmt,
174  StringRef FileName, SMLoc Loc) override;
175  void emitCVLinetableDirective(unsigned FunctionId, const MCSymbol *Begin,
176  const MCSymbol *End) override;
177  void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId,
178  unsigned SourceFileId,
179  unsigned SourceLineNum,
180  const MCSymbol *FnStartSym,
181  const MCSymbol *FnEndSym) override;
183  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
184  StringRef FixedSizePortion) override;
185  void emitCVStringTableDirective() override;
186  void emitCVFileChecksumsDirective() override;
187  void emitCVFileChecksumOffsetDirective(unsigned FileNo) override;
188  void emitDTPRel32Value(const MCExpr *Value) override;
189  void emitDTPRel64Value(const MCExpr *Value) override;
190  void emitTPRel32Value(const MCExpr *Value) override;
191  void emitTPRel64Value(const MCExpr *Value) override;
192  void emitGPRel32Value(const MCExpr *Value) override;
193  void emitGPRel64Value(const MCExpr *Value) override;
195  emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr,
196  SMLoc Loc, const MCSubtargetInfo &STI) override;
197  using MCStreamer::emitFill;
198  void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
199  SMLoc Loc = SMLoc()) override;
200  void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
201  SMLoc Loc = SMLoc()) override;
202  void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc,
203  const MCSubtargetInfo &STI) override;
204  void emitFileDirective(StringRef Filename) override;
205  void emitFileDirective(StringRef Filename, StringRef CompilerVerion,
206  StringRef TimeStamp, StringRef Description) override;
207 
208  void emitAddrsig() override;
209  void emitAddrsigSym(const MCSymbol *Sym) override;
210 
211  void finishImpl() override;
212 
213  /// Emit the absolute difference between two symbols if possible.
214  ///
215  /// Emit the absolute difference between \c Hi and \c Lo, as long as we can
216  /// compute it. Currently, that requires that both symbols are in the same
217  /// data fragment and that the target has not specified that diff expressions
218  /// require relocations to be emitted. Otherwise, do nothing and return
219  /// \c false.
220  ///
221  /// \pre Offset of \c Hi is greater than the offset \c Lo.
222  void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo,
223  unsigned Size) override;
224 
226  const MCSymbol *Lo) override;
227 
228  bool mayHaveInstructions(MCSection &Sec) const override;
229 
230  /// Emits pending conditional assignments that depend on \p Symbol
231  /// being emitted.
233 };
234 
235 } // end namespace llvm
236 
237 #endif
llvm::MCObjectStreamer::emitRelocDirective
Optional< std::pair< bool, std::string > > emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc, const MCSubtargetInfo &STI) override
Record a relocation described by the .reloc directive.
Definition: MCObjectStreamer.cpp:795
llvm::MCObjectStreamer::emitDwarfLocDirective
void emitDwarfLocDirective(unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName) override
This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
Definition: MCObjectStreamer.cpp:495
llvm::MCObjectStreamer::emitCVLinetableDirective
void emitCVLinetableDirective(unsigned FunctionId, const MCSymbol *Begin, const MCSymbol *End) override
This implements the CodeView '.cv_linetable' assembler directive.
Definition: MCObjectStreamer.cpp:597
llvm::MCObjectStreamer::emitFileDirective
void emitFileDirective(StringRef Filename) override
Switch to a new logical file.
Definition: MCObjectStreamer.cpp:898
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCObjectStreamer::emitLabel
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
Definition: MCObjectStreamer.cpp:286
llvm::MCObjectStreamer::emitCVLocDirective
void emitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc) override
This implements the CodeView '.cv_loc' assembler directive.
Definition: MCObjectStreamer.cpp:581
llvm::MCObjectStreamer::~MCObjectStreamer
~MCObjectStreamer()
llvm::MCObjectStreamer::emitValueToAlignment
void emitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
Definition: MCObjectStreamer.cpp:644
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
llvm::MCObjectStreamer::MCObjectStreamer
MCObjectStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Definition: MCObjectStreamer.cpp:27
llvm::MCObjectStreamer::emitDTPRel64Value
void emitDTPRel64Value(const MCExpr *Value) override
Emit the expression Value into the output as a dtprel (64-bit DTP relative) value.
Definition: MCObjectStreamer.cpp:683
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1181
llvm::MCObjectStreamer::emitAbsoluteSymbolDiffAsULEB128
void emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi, const MCSymbol *Lo) override
Emit the absolute difference between two symbols encoded with ULEB128.
Definition: MCObjectStreamer.cpp:171
MCFragment.h
llvm::MCObjectStreamer::emitBundleLock
void emitBundleLock(bool AlignToEnd) override
The following instructions are a bundle-locked group.
Definition: MCObjectStreamer.cpp:487
llvm::MCObjectStreamer::emitConditionalAssignment
void emitConditionalAssignment(MCSymbol *Symbol, const MCExpr *Value) override
Emit an assignment of Value to Symbol, but only if Value is also emitted.
Definition: MCObjectStreamer.cpp:393
llvm::MCObjectStreamer::emitCFISections
void emitCFISections(bool EH, bool Debug) override
Definition: MCObjectStreamer.cpp:238
llvm::MCObjectStreamer::emitAbsoluteSymbolDiff
void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) override
Emit the absolute difference between two symbols if possible.
Definition: MCObjectStreamer.cpp:162
llvm::MCObjectStreamer::emitLabelAtPos
virtual void emitLabelAtPos(MCSymbol *Symbol, SMLoc Loc, MCFragment *F, uint64_t Offset)
Definition: MCObjectStreamer.cpp:322
llvm::Optional
Definition: APInt.h:33
llvm::MCObjectStreamer::visitUsedSymbol
void visitUsedSymbol(const MCSymbol &Sym) override
Definition: MCObjectStreamer.cpp:234
llvm::MCObjectStreamer::emitCVFileChecksumOffsetDirective
void emitCVFileChecksumOffsetDirective(unsigned FileNo) override
This implements the CodeView '.cv_filechecksumoffset' assembler directive.
Definition: MCObjectStreamer.cpp:633
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::MCObjectStreamer::changeSection
void changeSection(MCSection *Section, const MCExpr *Subsection) override
Update streamer for a new active section.
Definition: MCObjectStreamer.cpp:363
llvm::MCObjectStreamer::reset
void reset() override
state management
Definition: MCObjectStreamer.cpp:179
llvm::MCObjectStreamer::emitDTPRel32Value
void emitDTPRel32Value(const MCExpr *Value) override
Emit the expression Value into the output as a dtprel (32-bit DTP relative) value.
Definition: MCObjectStreamer.cpp:673
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::MCSection::getFragmentList
MCSection::FragmentListType & getFragmentList()
Definition: MCSection.h:166
F
#define F(x, y, z)
Definition: MD5.cpp:55
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::MCFragment
Definition: MCFragment.h:30
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:212
llvm::MCAsmBackend
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:42
llvm::SMLoc
Represents a location in source code.
Definition: SMLoc.h:23
llvm::MCObjectStreamer::emitGPRel32Value
void emitGPRel32Value(const MCExpr *Value) override
Emit the expression Value into the output as a gprel32 (32-bit GP relative) value.
Definition: MCObjectStreamer.cpp:713
llvm::MCObjectStreamer::emitValueImpl
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc()) override
Emit the expression Value into the output as a native integer of the given Size bytes.
Definition: MCObjectStreamer.cpp:244
llvm::MCObjectStreamer::emitInstruction
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
Definition: MCObjectStreamer.cpp:409
llvm::MCObjectStreamer::emitBundleAlignMode
void emitBundleAlignMode(unsigned AlignPow2) override
Set the bundle alignment mode from now on in the section.
Definition: MCObjectStreamer.cpp:483
llvm::MCObjectStreamer
Streaming object file generation interface.
Definition: MCObjectStreamer.h:42
llvm::MCObjectStreamer::emitPendingAssignments
void emitPendingAssignments(MCSymbol *Symbol)
Emits pending conditional assignments that depend on Symbol being emitted.
Definition: MCObjectStreamer.cpp:310
llvm::MCObjectStreamer::emitDwarfAdvanceLineAddr
void emitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel, const MCSymbol *Label, unsigned PointerSize) override
If targets does not support representing debug line section by .loc/.file directives in assembly outp...
Definition: MCObjectStreamer.cpp:533
llvm::MCObjectStreamer::emitDwarfLineEndEntry
void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel) override
Emit the debug line end entry.
Definition: MCObjectStreamer.cpp:552
llvm::MCObjectStreamer::emitTPRel32Value
void emitTPRel32Value(const MCExpr *Value) override
Emit the expression Value into the output as a tprel (32-bit TP relative) value.
Definition: MCObjectStreamer.cpp:693
llvm::MCObjectStreamer::emitNops
void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc, const MCSubtargetInfo &STI) override
Definition: MCObjectStreamer.cpp:887
llvm::MCObjectStreamer::emitAssignment
void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
Emit an assignment of Value to Symbol.
Definition: MCObjectStreamer.cpp:387
llvm::MCObjectStreamer::getCurrentFragment
MCFragment * getCurrentFragment() const
Definition: MCObjectStreamer.cpp:201
llvm::MCStreamer::getCurrentSectionOnly
MCSection * getCurrentSectionOnly() const
Definition: MCStreamer.h:389
llvm::MCObjectStreamer::emitValueToOffset
void emitValueToOffset(const MCExpr *Offset, unsigned char Value, SMLoc Loc) override
Emit some number of copies of Value until the byte offset Offset is reached.
Definition: MCObjectStreamer.cpp:666
DF
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
llvm::MCObjectStreamer::addPendingLabel
void addPendingLabel(MCSymbol *label)
Assign a label to the current Section and Subsection even though a fragment is not yet present.
Definition: MCObjectStreamer.cpp:50
llvm::MCAssembler
Definition: MCAssembler.h:73
uint64_t
llvm::MCObjectStreamer::emitCVFileChecksumsDirective
void emitCVFileChecksumsDirective() override
This implements the CodeView '.cv_filechecksums' assembler directive.
Definition: MCObjectStreamer.cpp:629
llvm::MCObjectStreamer::emitBundleUnlock
void emitBundleUnlock() override
Ends a bundle-locked group.
Definition: MCObjectStreamer.cpp:491
llvm::DenseMap
Definition: DenseMap.h:714
llvm::MCObjectStreamer::emitSLEB128Value
void emitSLEB128Value(const MCExpr *Value) override
Definition: MCObjectStreamer.cpp:349
llvm::MCObjectStreamer::insert
void insert(MCFragment *F)
Definition: MCObjectStreamer.h:94
llvm::MCObjectStreamer::isIntegratedAssemblerRequired
bool isIntegratedAssemblerRequired() const override
Object streamers require the integrated assembler.
Definition: MCObjectStreamer.h:87
MCSection.h
llvm::MCObjectStreamer::getAssembler
MCAssembler & getAssembler()
Definition: MCObjectStreamer.h:128
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::MCObjectStreamer::getOrCreateDataFragment
MCDataFragment * getOrCreateDataFragment(const MCSubtargetInfo *STI=nullptr)
Get a data fragment to write into, creating a new one if the current fragment is not a data fragment.
Definition: MCObjectStreamer.cpp:225
Fixup
PowerPC TLS Dynamic Call Fixup
Definition: PPCTLSDynamicCall.cpp:215
llvm::MCObjectStreamer::changeSectionImpl
bool changeSectionImpl(MCSection *Section, const MCExpr *Subsection)
Definition: MCObjectStreamer.cpp:368
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
MCFixup.h
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
llvm::MCObjectStreamer::emitWeakReference
void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override
Emit an weak reference from Alias to Symbol.
Definition: MCObjectStreamer.cpp:358
llvm::MCObjectStreamer::emitInstToFragment
virtual void emitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &)
Emit an instruction to a special fragment, because this instruction can change its size during relaxa...
Definition: MCObjectStreamer.cpp:461
llvm::MCObjectStreamer::emitAddrsigSym
void emitAddrsigSym(const MCSymbol *Sym) override
Definition: MCObjectStreamer.cpp:914
llvm::MCObjectStreamer::emitFill
void emitFill(const MCExpr &NumBytes, uint64_t FillValue, SMLoc Loc=SMLoc()) override
Emit Size bytes worth of the value specified by FillValue.
Definition: MCObjectStreamer.cpp:848
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
llvm::ilist_iterator
Iterator for intrusive lists based on ilist_node.
Definition: ilist_iterator.h:57
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::MCObjectStreamer::emitULEB128Value
void emitULEB128Value(const MCExpr *Value) override
Definition: MCObjectStreamer.cpp:340
llvm::MCObjectStreamer::emitCVDefRangeDirective
void emitCVDefRangeDirective(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * >> Ranges, StringRef FixedSizePortion) override
This implements the CodeView '.cv_def_range' assembler directive.
Definition: MCObjectStreamer.cpp:615
llvm::MCObjectStreamer::emitAddrsig
void emitAddrsig() override
Definition: MCObjectStreamer.cpp:910
llvm::LCOMM::ByteAlignment
@ ByteAlignment
Definition: MCAsmInfo.h:50
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::iplist_impl::insert
iterator insert(iterator where, pointer New)
Definition: ilist.h:229
llvm::MCObjectStreamer::emitCVStringTableDirective
void emitCVStringTableDirective() override
This implements the CodeView '.cv_stringtable' assembler directive.
Definition: MCObjectStreamer.cpp:626
llvm::MCObjectStreamer::emitBytes
void emitBytes(StringRef Data) override
Emit the bytes in Data into the output.
Definition: MCObjectStreamer.cpp:637
llvm::MCObjectStreamer::flushPendingLabels
void flushPendingLabels()
Create a data fragment for any pending labels across all Sections and Subsections.
Definition: MCObjectStreamer.cpp:91
llvm::MCStreamer::emitFill
void emitFill(uint64_t NumBytes, uint8_t FillValue)
Emit NumBytes bytes worth of the value specified by FillValue.
Definition: MCStreamer.cpp:219
SmallVector.h
MCStreamer.h
llvm::MCObjectStreamer::emitGPRel64Value
void emitGPRel64Value(const MCExpr *Value) override
Emit the expression Value into the output as a gprel64 (64-bit GP relative) value.
Definition: MCObjectStreamer.cpp:723
llvm::SmallSetVector
A SetVector that performs no allocations if smaller than a certain size.
Definition: SetVector.h:307
llvm::MCObjectStreamer::emitTPRel64Value
void emitTPRel64Value(const MCExpr *Value) override
Emit the expression Value into the output as a tprel (64-bit TP relative) value.
Definition: MCObjectStreamer.cpp:703
llvm::MCObjectStreamer::mayHaveInstructions
bool mayHaveInstructions(MCSection &Sec) const override
Definition: MCObjectStreamer.cpp:405
llvm::MCObjectStreamer::finishImpl
void finishImpl() override
Streamer specific finalization.
Definition: MCObjectStreamer.cpp:919
llvm::MCObjectStreamer::emitFrames
void emitFrames(MCAsmBackend *MAB)
Definition: MCObjectStreamer.cpp:190
llvm::MCObjectStreamer::emitCodeAlignment
void emitCodeAlignment(unsigned ByteAlignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0) override
Emit nops until the byte alignment ByteAlignment is reached.
Definition: MCObjectStreamer.cpp:659
llvm::MCDataFragment
Fragment for data and encoded instructions.
Definition: MCFragment.h:241
llvm::MCObjectStreamer::emitCVInlineLinetableDirective
void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym) override
This implements the CodeView '.cv_inline_linetable' assembler directive.
Definition: MCObjectStreamer.cpp:605
llvm::MCDwarfFrameInfo
Definition: MCDwarf.h:681
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:76
llvm::MCFixup
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:71
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::MCObjectStreamer::emitDwarfAdvanceFrameAddr
void emitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel, const MCSymbol *Label)
Definition: MCObjectStreamer.cpp:570
llvm::ISD::MCSymbol
@ MCSymbol
Definition: ISDOpcodes.h:172
SetVector.h
llvm::MCObjectStreamer::getAssemblerPtr
MCAssembler * getAssemblerPtr() override
Definition: MCObjectStreamer.cpp:44