LLVM API Documentation

Classes | Public Types | Public Member Functions | Friends
llvm::MCAssembler Class Reference

#include <MCAssembler.h>

List of all members.

Classes

struct  VersionMinInfoType
 MachO specific deployment target version info. More...

Public Types

typedef iplist< MCSectionDataSectionDataListType
typedef iplist< MCSymbolDataSymbolDataListType
typedef
SectionDataListType::const_iterator 
const_iterator
typedef
SectionDataListType::iterator 
iterator
typedef
SymbolDataListType::const_iterator 
const_symbol_iterator
typedef
SymbolDataListType::iterator 
symbol_iterator
typedef iterator_range
< symbol_iterator
symbol_range
typedef iterator_range
< const_symbol_iterator
const_symbol_range
typedef std::vector< std::string > FileNameVectorType
typedef
FileNameVectorType::const_iterator 
const_file_name_iterator
typedef std::vector
< IndirectSymbolData >
::const_iterator 
const_indirect_symbol_iterator
typedef std::vector
< IndirectSymbolData >
::iterator 
indirect_symbol_iterator
typedef std::vector
< DataRegionData >
::const_iterator 
const_data_region_iterator
typedef std::vector
< DataRegionData >::iterator 
data_region_iterator

Public Member Functions

uint64_t computeFragmentSize (const MCAsmLayout &Layout, const MCFragment &F) const
const MCSymbolDatagetAtom (const MCSymbolData *Symbol) const
bool isSymbolLinkerVisible (const MCSymbol &SD) const
void writeSectionData (const MCSectionData *Section, const MCAsmLayout &Layout) const
 Emit the section contents using the given object writer.
bool isThumbFunc (const MCSymbol *Func) const
 Check whether a given symbol has been flagged with .thumb_func.
void setIsThumbFunc (const MCSymbol *Func)
 Flag a function symbol as the target of a .thumb_func directive.
unsigned getELFHeaderEFlags () const
 ELF e_header flags.
void setELFHeaderEFlags (unsigned Flags)
const VersionMinInfoTypegetVersionMinInfo () const
 MachO deployment target version information.
void setVersionMinInfo (MCVersionMinType Kind, unsigned Major, unsigned Minor, unsigned Update)
 MCAssembler (MCContext &Context_, MCAsmBackend &Backend_, MCCodeEmitter &Emitter_, MCObjectWriter &Writer_, raw_ostream &OS)
 ~MCAssembler ()
void reset ()
MCContextgetContext () const
MCAsmBackendgetBackend () const
MCCodeEmittergetEmitter () const
MCObjectWritergetWriter () const
void Finish ()
bool getSubsectionsViaSymbols () const
void setSubsectionsViaSymbols (bool Value)
bool getRelaxAll () const
void setRelaxAll (bool Value)
bool getNoExecStack () const
void setNoExecStack (bool Value)
bool isBundlingEnabled () const
unsigned getBundleAlignSize () const
void setBundleAlignSize (unsigned Size)
const SymbolDataListTypegetSymbolList () const
SymbolDataListTypegetSymbolList ()
symbol_iterator symbol_begin ()
const_symbol_iterator symbol_begin () const
symbol_iterator symbol_end ()
const_symbol_iterator symbol_end () const
symbol_range symbols ()
const_symbol_range symbols () const
size_t symbol_size () const
std::vector< IndirectSymbolData > & getIndirectSymbols ()
indirect_symbol_iterator indirect_symbol_begin ()
const_indirect_symbol_iterator indirect_symbol_begin () const
indirect_symbol_iterator indirect_symbol_end ()
const_indirect_symbol_iterator indirect_symbol_end () const
size_t indirect_symbol_size () const
std::vector< std::vector
< std::string > > & 
getLinkerOptions ()
std::vector< DataRegionData > & getDataRegions ()
data_region_iterator data_region_begin ()
const_data_region_iterator data_region_begin () const
data_region_iterator data_region_end ()
const_data_region_iterator data_region_end () const
size_t data_region_size () const
MCLOHContainergetLOHContainer ()
const MCLOHContainergetLOHContainer () const
MCSectionDatagetSectionData (const MCSection &Section) const
MCSectionDatagetOrCreateSectionData (const MCSection &Section, bool *Created=nullptr)
bool hasSymbolData (const MCSymbol &Symbol) const
MCSymbolDatagetSymbolData (const MCSymbol &Symbol)
const MCSymbolDatagetSymbolData (const MCSymbol &Symbol) const
MCSymbolDatagetOrCreateSymbolData (const MCSymbol &Symbol, bool *Created=nullptr)
const_file_name_iterator file_names_begin () const
const_file_name_iterator file_names_end () const
void addFileName (StringRef FileName)
void dump ()
Section List Access
const SectionDataListTypegetSectionList () const
SectionDataListTypegetSectionList ()
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
size_t size () const

Friends

class MCAsmLayout

Detailed Description

Definition at line 824 of file MCAssembler.h.


Member Typedef Documentation

Definition at line 848 of file MCAssembler.h.

typedef FileNameVectorType::const_iterator llvm::MCAssembler::const_file_name_iterator

Definition at line 841 of file MCAssembler.h.

Definition at line 844 of file MCAssembler.h.

Definition at line 831 of file MCAssembler.h.

Definition at line 834 of file MCAssembler.h.

Definition at line 838 of file MCAssembler.h.

Definition at line 849 of file MCAssembler.h.

typedef std::vector<std::string> llvm::MCAssembler::FileNameVectorType

Definition at line 840 of file MCAssembler.h.

Definition at line 845 of file MCAssembler.h.

Definition at line 832 of file MCAssembler.h.

Definition at line 828 of file MCAssembler.h.

Definition at line 835 of file MCAssembler.h.

Definition at line 837 of file MCAssembler.h.

Definition at line 829 of file MCAssembler.h.


Constructor & Destructor Documentation

MCAssembler::MCAssembler ( MCContext Context_,
MCAsmBackend Backend_,
MCCodeEmitter Emitter_,
MCObjectWriter Writer_,
raw_ostream OS 
)

Construct a new assembler instance.

Parameters:
OSThe stream to output to.

Definition at line 348 of file MCAssembler.cpp.

References llvm::MCAssembler::VersionMinInfoType::Major.

Definition at line 357 of file MCAssembler.cpp.


Member Function Documentation

void llvm::MCAssembler::addFileName ( StringRef  FileName) [inline]

Definition at line 1083 of file MCAssembler.h.

References llvm::iplist< NodeTy, Traits >::begin().

uint64_t MCAssembler::computeFragmentSize ( const MCAsmLayout Layout,
const MCFragment F 
) const

Definition at line 1146 of file MCAssembler.h.

Referenced by llvm::MachObjectWriter::WriteObject().

Definition at line 1149 of file MCAssembler.h.

Definition at line 1153 of file MCAssembler.h.

Referenced by llvm::MachObjectWriter::WriteObject().

Definition at line 1156 of file MCAssembler.h.

size_t llvm::MCAssembler::data_region_size ( ) const [inline]

Definition at line 1160 of file MCAssembler.h.

Definition at line 1259 of file MCAssembler.cpp.

References begin(), end(), llvm::errs(), symbol_begin(), and symbol_end().

Referenced by Finish().

Definition at line 1086 of file MCAssembler.h.

References llvm::iplist< NodeTy, Traits >::end().

Definition at line 1218 of file MCAssembler.h.

References llvm::ARMBuildAttrs::Symbol.

Definition at line 1222 of file MCAssembler.h.

Find the symbol which defines the atom containing the given symbol, or null if there is no such symbol.

Definition at line 423 of file MCAssembler.cpp.

References llvm::MCFragment::getAtom(), getBackend(), llvm::MCSymbolData::getFragment(), llvm::MCFragment::getParent(), llvm::MCSectionData::getSection(), llvm::MCSymbolData::getSymbol(), llvm::MCAsmBackend::isSectionAtomizable(), and isSymbolLinkerVisible().

Definition at line 1142 of file MCAssembler.h.

Referenced by llvm::MachObjectWriter::WriteObject().

Definition at line 1111 of file MCAssembler.h.

Referenced by llvm::MCELFStreamer::EmitSymbolAttribute().

std::vector<std::vector<std::string> >& llvm::MCAssembler::getLinkerOptions ( ) [inline]

Definition at line 1133 of file MCAssembler.h.

Referenced by llvm::MachObjectWriter::WriteObject().

Definition at line 1167 of file MCAssembler.h.

Referenced by reset(), and llvm::MachObjectWriter::WriteObject().

Definition at line 1170 of file MCAssembler.h.

Definition at line 1059 of file MCAssembler.h.

MCSectionData& llvm::MCAssembler::getOrCreateSectionData ( const MCSection Section,
bool Created = nullptr 
) [inline]
MCSymbolData& llvm::MCAssembler::getOrCreateSymbolData ( const MCSymbol Symbol,
bool Created = nullptr 
) [inline]

Definition at line 1056 of file MCAssembler.h.

Referenced by llvm::MCObjectStreamer::EmitInstruction().

Definition at line 1175 of file MCAssembler.h.

Definition at line 1079 of file MCAssembler.h.

Referenced by llvm::MCSectionData::MCSectionData().

Definition at line 1080 of file MCAssembler.h.

Definition at line 1201 of file MCAssembler.h.

Definition at line 1092 of file MCAssembler.h.

Referenced by llvm::MCSymbolData::MCSymbolData().

Definition at line 1093 of file MCAssembler.h.

MachO deployment target version information.

Definition at line 1008 of file MCAssembler.h.

Referenced by llvm::MachObjectWriter::WriteObject().

bool llvm::MCAssembler::hasSymbolData ( const MCSymbol Symbol) const [inline]

Definition at line 1192 of file MCAssembler.h.

References llvm::ARMBuildAttrs::Section.

Definition at line 1118 of file MCAssembler.h.

Definition at line 1125 of file MCAssembler.h.

size_t llvm::MCAssembler::indirect_symbol_size ( ) const [inline]

Definition at line 1129 of file MCAssembler.h.

Referenced by llvm::MachObjectWriter::WriteObject().

Check whether a particular symbol is visible to the linker and is required in the symbol table, or whether it can be discarded by the assembler. This also effects whether the assembler treats the label as potentially defining a separate atom.

Definition at line 410 of file MCAssembler.cpp.

References llvm::MCAsmBackend::doesSectionRequireSymbols(), getBackend(), llvm::MCSymbol::getSection(), llvm::MCSymbol::isInSection(), and llvm::MCSymbol::isTemporary().

Referenced by llvm::MachObjectWriter::ComputeSymbolTable(), and getAtom().

Definition at line 1070 of file MCAssembler.h.

Referenced by llvm::MCELFStreamer::EmitBundleAlignMode().

Flag a function symbol as the target of a .thumb_func directive.

Definition at line 1001 of file MCAssembler.h.

void llvm::MCAssembler::setNoExecStack ( bool  Value) [inline]

Definition at line 1060 of file MCAssembler.h.

Referenced by llvm::createELFStreamer().

void llvm::MCAssembler::setRelaxAll ( bool  Value) [inline]

Definition at line 1057 of file MCAssembler.h.

Referenced by llvm::createELFStreamer().

Definition at line 1052 of file MCAssembler.h.

Referenced by llvm::MCELFStreamer::EmitAssemblerFlag().

void llvm::MCAssembler::setVersionMinInfo ( MCVersionMinType  Kind,
unsigned  Major,
unsigned  Minor,
unsigned  Update 
) [inline]
size_t llvm::MCAssembler::size ( ) const [inline]

Definition at line 1095 of file MCAssembler.h.

Referenced by dump(), symbol_size(), and symbols().

Definition at line 1096 of file MCAssembler.h.

References llvm::iplist< NodeTy, Traits >::begin().

Definition at line 1098 of file MCAssembler.h.

References llvm::iplist< NodeTy, Traits >::begin().

Referenced by dump(), symbol_size(), and symbols().

Definition at line 1099 of file MCAssembler.h.

References llvm::iplist< NodeTy, Traits >::end().

size_t llvm::MCAssembler::symbol_size ( ) const [inline]

Definition at line 1104 of file MCAssembler.h.

References llvm::make_range(), symbol_begin(), and symbol_end().

Definition at line 1102 of file MCAssembler.h.

References llvm::make_range(), symbol_begin(), and symbol_end().

void MCAssembler::writeSectionData ( const MCSectionData Section,
const MCAsmLayout Layout 
) const

Friends And Related Function Documentation

friend class MCAsmLayout [friend]

Definition at line 825 of file MCAssembler.h.


The documentation for this class was generated from the following files: