10 #ifndef LLVM_MC_MCASSEMBLER_H
11 #define LLVM_MC_MCASSEMBLER_H
37 class MCSubtargetInfo;
74 typedef std::vector<IndirectSymbolData>::const_iterator
78 typedef std::vector<DataRegionData>::const_iterator
108 std::vector<IndirectSymbolData> IndirectSymbols;
110 std::vector<DataRegionData> DataRegions;
113 std::vector<std::vector<std::string>> LinkerOptions;
116 std::vector<std::string> FileNames;
132 unsigned BundleAlignSize;
134 unsigned RelaxAll : 1;
135 unsigned SubsectionsViaSymbols : 1;
136 unsigned IncrementalLinkerCompatible : 1;
143 unsigned ELFHeaderEFlags;
167 uint64_t &
Value)
const;
191 bool relaxDwarfCallFrameFragment(
MCAsmLayout &Layout,
200 std::pair<uint64_t, bool> handleFixup(
const MCAsmLayout &Layout,
238 VersionMinInfo.
Major = Major;
239 VersionMinInfo.
Minor = Minor;
240 VersionMinInfo.
Update = Update;
282 return IncrementalLinkerCompatible;
285 IncrementalLinkerCompatible = Value;
296 assert((Size == 0 || !(Size & (Size - 1))) &&
297 "Expect a power-of-two bundle align size");
298 BundleAlignSize = Size;
310 size_t size()
const {
return Sections.size(); }
336 return IndirectSymbols;
340 return IndirectSymbols.begin();
343 return IndirectSymbols.begin();
347 return IndirectSymbols.end();
350 return IndirectSymbols.end();
360 return LinkerOptions;
374 return DataRegions.begin();
379 return DataRegions.end();
407 FileNames.push_back(FileName);
424 uint64_t FOffset, uint64_t FSize);
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...
std::vector< DataRegionData >::iterator data_region_iterator
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 ...
pointee_iterator< SectionListType::const_iterator > const_iterator
std::vector< MCSection * > SectionListType
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()
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
enum llvm::DataRegionData::KindTy Kind
struct fuzzer::@269 Flags
Encapsulates the layout of an assembly file at a particular point in time.
std::vector< DataRegionData >::const_iterator const_data_region_iterator
void setRelaxAll(bool Value)
bool registerSection(MCSection &Section)
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...
std::vector< IndirectSymbolData >::const_iterator const_indirect_symbol_iterator
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.
pointee_iterator< SymbolDataListType::iterator > symbol_iterator
const_symbol_iterator symbol_begin() const
size_t symbol_size() const
data_region_iterator data_region_begin()
iterator_range< symbol_iterator > symbol_range
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.
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.
MachO specific deployment target version info.
Fragment representing the binary annotations produced by the .cv_inline_linetable directive...
bool getSubsectionsViaSymbols() const
const_symbol_range symbols() const
MCAsmBackend & getBackend() const
iterator_range< const_symbol_iterator > const_symbol_range
data_region_iterator data_region_end()
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< IndirectSymbolData >::iterator indirect_symbol_iterator
pointee_iterator< SectionListType::iterator > iterator
void Finish()
Finish - Do final processing and write the object to the output stream.
pointee_iterator< SymbolDataListType::const_iterator > const_symbol_iterator
size_t data_region_size() const
std::vector< const MCSymbol * > SymbolDataListType
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.