10 #ifndef LLVM_MC_MCASSEMBLER_H
11 #define LLVM_MC_MCASSEMBLER_H
77 std::vector<IndirectSymbolData>::const_iterator;
81 std::vector<DataRegionData>::const_iterator;
107 std::vector<IndirectSymbolData> IndirectSymbols;
109 std::vector<DataRegionData> DataRegions;
112 std::vector<std::vector<std::string>> LinkerOptions;
115 std::vector<std::string> FileNames;
131 unsigned BundleAlignSize;
134 bool SubsectionsViaSymbols : 1;
135 bool IncrementalLinkerCompatible : 1;
142 unsigned ELFHeaderEFlags;
165 uint64_t &
Value)
const;
189 bool relaxDwarfCallFrameFragment(
MCAsmLayout &Layout,
198 std::tuple<MCValue, uint64_t, bool>
247 VersionMinInfo.Kind =
Kind;
248 VersionMinInfo.Major =
Major;
249 VersionMinInfo.Minor =
Minor;
250 VersionMinInfo.Update =
Update;
281 return IncrementalLinkerCompatible;
284 IncrementalLinkerCompatible = Value;
295 assert((Size == 0 || !(Size & (Size - 1))) &&
296 "Expect a power-of-two bundle align size");
297 BundleAlignSize =
Size;
309 size_t size()
const {
return Sections.size(); }
335 return IndirectSymbols;
339 return IndirectSymbols.begin();
342 return IndirectSymbols.begin();
346 return IndirectSymbols.end();
349 return IndirectSymbols.end();
359 return LinkerOptions;
373 return DataRegions.begin();
378 return DataRegions.end();
406 FileNames.push_back(FileName);
423 uint64_t FOffset, uint64_t FSize);
427 #endif // LLVM_MC_MCASSEMBLER_H
void setIsThumbFunc(const MCSymbol *Func)
Flag a function symbol as the target of a .thumb_func directive.
size_t indirect_symbol_size() const
void setELFHeaderEFlags(unsigned Flags)
Instances of this class represent a uniqued identifier for a section in the current translation unit...
const MCLOHContainer & getLOHContainer() const
void setVersionMinInfo(MCVersionMinType Kind, unsigned Major, unsigned Minor, unsigned Update)
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
unsigned getBundleAlignSize() const
const VersionMinInfoType & getVersionMinInfo() const
MachO deployment target version information.
void writeFragmentPadding(const MCFragment &F, uint64_t FSize, MCObjectWriter *OW) const
Write the necessary bundle padding to the given object writer.
MCCodeEmitter & getEmitter() const
void registerSymbol(const MCSymbol &Symbol, bool *Created=nullptr)
std::vector< IndirectSymbolData > & getIndirectSymbols()
unsigned getELFHeaderEFlags() const
ELF e_header flags.
MCContext & getContext() const
Defines the object file and target independent interfaces used by the assembler backend to write nati...
symbol_iterator symbol_begin()
std::vector< DataRegionData >::iterator data_region_iterator
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
enum llvm::DataRegionData::KindTy Kind
Encapsulates the layout of an assembly file at a particular point in time.
void setRelaxAll(bool Value)
bool registerSection(MCSection &Section)
struct{MCVersionMinType Kind VersionMinInfoType
MachO specific deployment target version info.
void setSubsectionsViaSymbols(bool Value)
ArrayRef< std::string > getFileNames()
Context object for machine code objects.
void setDWARFLinetableParams(MCDwarfLineTableParams P)
MCObjectWriter & getWriter() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
void setBundleAlignSize(unsigned Size)
bool isThumbFunc(const MCSymbol *Func) const
Check whether a given symbol has been flagged with .thumb_func.
const MCSymbol * getAtom(const MCSymbol &S) const
Find the symbol which defines the atom containing the given symbol, or null if there is no such symbo...
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
const_data_region_iterator data_region_begin() const
MCDwarfLineTableParams getDWARFLinetableParams() const
void writeSectionData(const MCSection *Section, const MCAsmLayout &Layout) const
Emit the section contents using the given object writer.
const_symbol_iterator symbol_end() const
uint64_t computeFragmentSize(const MCAsmLayout &Layout, const MCFragment &F) const
Compute the effective fragment size assuming it is laid out at the given SectionAddress and FragmentO...
const_iterator end() const
MCCodeEmitter - Generic instruction encoding interface.
std::vector< DataRegionData >::const_iterator const_data_region_iterator
std::vector< IndirectSymbolData >::const_iterator const_indirect_symbol_iterator
const_symbol_iterator symbol_begin() const
size_t symbol_size() const
data_region_iterator data_region_begin()
std::vector< const MCSymbol * > SymbolDataListType
Fragment representing the .cv_def_range directive.
void layout(MCAsmLayout &Layout)
const_indirect_symbol_iterator indirect_symbol_end() const
bool isSymbolLinkerVisible(const MCSymbol &SD) const
Check whether a particular symbol is visible to the linker and is required in the symbol table...
uint64_t computeBundlePadding(const MCAssembler &Assembler, const MCFragment *F, uint64_t FOffset, uint64_t FSize)
Compute the amount of padding required before the fragment F to obey bundling restrictions, where FOffset is the fragment's offset in its section and FSize is the fragment's size.
MCAssembler(MCContext &Context, MCAsmBackend &Backend, MCCodeEmitter &Emitter, MCObjectWriter &Writer)
Construct a new assembler instance.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
std::vector< std::vector< std::string > > & getLinkerOptions()
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
indirect_symbol_iterator indirect_symbol_begin()
void setIncrementalLinkerCompatible(bool Value)
bool isBundlingEnabled() const
An iterator type that allows iterating over the pointees via some other iterator. ...
MCLOHContainer & getLOHContainer()
void addFileName(StringRef FileName)
A range adaptor for a pair of iterators.
Target - Wrapper for Target specific information.
Fragment representing the binary annotations produced by the .cv_inline_linetable directive...
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
bool getSubsectionsViaSymbols() const
static std::vector< std::string > Flags
MCAssembler & operator=(const MCAssembler &)=delete
const_symbol_range symbols() const
MCAsmBackend & getBackend() const
data_region_iterator data_region_end()
std::vector< IndirectSymbolData >::iterator indirect_symbol_iterator
void reset()
Reuse an assembler instance.
const_iterator begin() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const_data_region_iterator data_region_end() const
bool isIncrementalLinkerCompatible() const
LLVM Value Representation.
Generic interface to target specific assembler backends.
indirect_symbol_iterator indirect_symbol_end()
const_indirect_symbol_iterator indirect_symbol_begin() const
StringRef - Represent a constant reference to a string, i.e.
std::vector< DataRegionData > & getDataRegions()
std::vector< MCSection * > SectionListType
void Finish()
Finish - Do final processing and write the object to the output stream.
size_t data_region_size() const
symbol_iterator symbol_end()
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.