LLVM: include/llvm/MC/MCAssembler.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_MC_MCASSEMBLER_H
10#define LLVM_MC_MCASSEMBLER_H
11
22#include
23#include
24#include
25#include
26#include
27#include
28
29namespace llvm {
30
45
47public:
51
52private:
54
55 std::unique_ptr Backend;
56 std::unique_ptr Emitter;
57 std::unique_ptr Writer;
58
59 bool HasLayout = false;
60 bool HasFinalLayout = false;
61 bool RelaxAll = false;
62
64
66
67 struct RelocDirective {
71 };
73
75
77
78
79
80
81
82
83
84
86
87
88
89
90
91
92
93
94
95
96
97
100
101
102
103 bool fixupNeedsRelaxation(const MCFragment &, const MCFixup &) const;
104
105 void layoutSection(MCSection &Sec);
106
107
108 unsigned relaxOnce(unsigned FirstStable);
109
110
116 void relaxDwarfCallFrameFragment(MCFragment &F);
118
119public:
120
121
122
123
124
125
127 std::unique_ptr Backend,
128 std::unique_ptr Emitter,
129 std::unique_ptr Writer);
132
133
135
136
138
141
142
143
144
146
147
149
150
152
153
156
157
159
160
162
163
164
166
168
170
172
174
176
178
180
181
182
183
185
186
188
193
196
203
207
209
210
213
215};
216
217}
218
219#endif
dxil DXContainer Global Emitter
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
PowerPC TLS Dynamic Call Fixup
This file defines the SmallPtrSet class.
This file defines the SmallVector class.
Generic interface to target specific assembler backends.
const_iterator begin() const
Definition MCAssembler.h:194
MCContext & getContext() const
Definition MCAssembler.h:167
LLVM_ABI bool getSymbolOffset(const MCSymbol &S, uint64_t &Val) const
LLVM_ABI uint64_t getSectionAddressSize(const MCSection &Sec) const
MCAssembler & operator=(const MCAssembler &)=delete
LLVM_ABI void Finish()
Finish - Do final processing and write the object to the output stream.
SmallVector< MCSection *, 0 > SectionListType
Definition MCAssembler.h:49
LLVM_ABI void reportError(SMLoc L, const Twine &Msg) const
void setIsThumbFunc(const MCSymbol *Func)
Flag a function symbol as the target of a .thumb_func directive.
Definition MCAssembler.h:161
LLVM_ABI void writeSectionData(raw_ostream &OS, const MCSection *Section) const
Emit the section contents to OS.
iterator_range< pointee_iterator< SmallVector< const MCSymbol *, 0 >::const_iterator > > symbols() const
Definition MCAssembler.h:200
LLVM_ABI void dump() const
MCObjectWriter & getWriter() const
Definition MCAssembler.h:177
bool hasFinalLayout() const
Definition MCAssembler.h:190
MCCodeEmitter * getEmitterPtr() const
Definition MCAssembler.h:171
LLVM_ABI void addRelocDirective(RelocDirective RD)
SmallVectorImpl< const MCSymbol * > & getSymbols()
Definition MCAssembler.h:197
bool getRelaxAll() const
Definition MCAssembler.h:191
MCAssembler(const MCAssembler &)=delete
MCCodeEmitter & getEmitter() const
Definition MCAssembler.h:175
LLVM_ABI void recordError(SMLoc L, const Twine &Msg) const
LLVM_ABI MCAssembler(MCContext &Context, std::unique_ptr< MCAsmBackend > Backend, std::unique_ptr< MCCodeEmitter > Emitter, std::unique_ptr< MCObjectWriter > Writer)
Construct a new assembler instance.
LLVM_ABI bool isThumbFunc(const MCSymbol *Func) const
Check whether a given symbol has been flagged with .thumb_func.
const_iterator end() const
Definition MCAssembler.h:195
MCAsmBackend & getBackend() const
Definition MCAssembler.h:173
LLVM_ABI bool registerSection(MCSection &Section)
LLVM_ABI void flushPendingErrors() const
LLVM_ABI uint64_t computeFragmentSize(const MCFragment &F) const
Compute the effective fragment size.
LLVM_ABI const MCSymbol * getBaseSymbol(const MCSymbol &Symbol) const
pointee_iterator< SectionListType::const_iterator > const_iterator
Definition MCAssembler.h:50
MCAsmBackend * getBackendPtr() const
Definition MCAssembler.h:169
LLVM_ABI uint64_t getSectionFileSize(const MCSection &Sec) const
friend class MCObjectWriter
Definition MCAssembler.h:48
LLVM_ABI void reset()
Reuse an assembler instance.
LLVM_ABI bool registerSymbol(const MCSymbol &Symbol)
bool hasLayout() const
Definition MCAssembler.h:189
uint64_t getFragmentOffset(const MCFragment &F) const
Definition MCAssembler.h:137
MCDwarfLineTableParams getDWARFLinetableParams() const
Definition MCAssembler.h:179
void setRelaxAll(bool Value)
Definition MCAssembler.h:192
Represents required padding such that a particular other set of fragments does not cross a particular...
Fragment representing the .cv_def_range directive.
Fragment representing the binary annotations produced by the .cv_inline_linetable directive.
MCCodeEmitter - Generic instruction encoding interface.
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Defines the object file and target independent interfaces used by the assembler backend to write nati...
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Represent a reference to a symbol from inside an expression.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Represents a location in source code.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Target - Wrapper for Target specific information.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM Value Representation.
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< pointee_iterator< WrappedIteratorT > > make_pointee_range(RangeT &&Range)
FunctionAddr VTableAddr uintptr_t uintptr_t Data
An iterator type that allows iterating over the pointees via some other iterator.