LLVM API Documentation
#include <MCAssembler.h>
Public Member Functions | |
MCSymbolData () | |
MCSymbolData (const MCSymbol &_Symbol, MCFragment *_Fragment, uint64_t _Offset, MCAssembler *A=nullptr) | |
bool | isExternal () const |
void | setExternal (bool Value) |
bool | isPrivateExtern () const |
void | setPrivateExtern (bool Value) |
bool | isCommon () const |
isCommon - Is this a 'common' symbol. | |
void | setCommon (uint64_t Size, unsigned Align) |
uint64_t | getCommonSize () const |
getCommonSize - Return the size of a 'common' symbol. | |
void | setSize (const MCExpr *SS) |
const MCExpr * | getSize () const |
unsigned | getCommonAlignment () const |
getCommonAlignment - Return the alignment of a 'common' symbol. | |
uint32_t | getFlags () const |
getFlags - Get the (implementation defined) symbol flags. | |
void | setFlags (uint32_t Value) |
setFlags - Set the (implementation defined) symbol flags. | |
void | modifyFlags (uint32_t Value, uint32_t Mask) |
modifyFlags - Modify the flags via a mask | |
uint64_t | getIndex () const |
getIndex - Get the (implementation defined) index. | |
void | setIndex (uint64_t Value) |
setIndex - Set the (implementation defined) index. | |
void | dump () const |
Accessors | |
const MCSymbol & | getSymbol () const |
MCFragment * | getFragment () const |
void | setFragment (MCFragment *Value) |
uint64_t | getOffset () const |
void | setOffset (uint64_t Value) |
Public Attributes | |
const MCSymbol * | Symbol |
MCFragment * | Fragment |
Fragment - The fragment this symbol's value is relative to, if any. | |
uint64_t | Offset |
unsigned | IsExternal: 1 |
unsigned | IsPrivateExtern: 1 |
IsPrivateExtern - True if this symbol is private extern. | |
uint64_t | CommonSize |
CommonSize - The size of the symbol, if it is 'common', or 0. | |
const MCExpr * | SymbolSize |
unsigned | CommonAlign |
CommonAlign - The alignment of the symbol, if it is 'common'. | |
uint32_t | Flags |
uint64_t | Index |
Index - Index field, for use by the object file implementation. |
Definition at line 686 of file MCAssembler.h.
Definition at line 333 of file MCAssembler.cpp.
MCSymbolData::MCSymbolData | ( | const MCSymbol & | _Symbol, |
MCFragment * | _Fragment, | ||
uint64_t | _Offset, | ||
MCAssembler * | A = nullptr |
||
) |
Definition at line 335 of file MCAssembler.cpp.
References llvm::MCAssembler::getSymbolList(), and llvm::iplist< NodeTy, Traits >::push_back().
void MCSymbolData::dump | ( | ) | const |
Definition at line 1243 of file MCAssembler.cpp.
References llvm::errs(), getCommonAlignment(), getCommonSize(), getFlags(), getFragment(), getIndex(), getOffset(), getSymbol(), isCommon(), isExternal(), and isPrivateExtern().
unsigned llvm::MCSymbolData::getCommonAlignment | ( | ) | const [inline] |
getCommonAlignment - Return the alignment of a 'common' symbol.
Definition at line 779 of file MCAssembler.h.
References CommonAlign, and isCommon().
Referenced by dump(), and llvm::MachObjectWriter::WriteNlist().
uint64_t llvm::MCSymbolData::getCommonSize | ( | ) | const [inline] |
getCommonSize - Return the size of a 'common' symbol.
Definition at line 764 of file MCAssembler.h.
References CommonSize, and isCommon().
Referenced by dump(), getSymbolValue(), and llvm::MachObjectWriter::WriteNlist().
uint32_t llvm::MCSymbolData::getFlags | ( | ) | const [inline] |
getFlags - Get the (implementation defined) symbol flags.
Definition at line 785 of file MCAssembler.h.
References Flags.
Referenced by llvm::MachObjectWriter::BindIndirectSymbols(), llvm::MachObjectWriter::doesSymbolRequireExternRelocation(), dump(), llvm::MCELF::GetBinding(), llvm::MCELF::getOther(), llvm::MCELF::GetType(), llvm::MCELF::GetVisibility(), llvm::MCELF::SetBinding(), llvm::MCELF::setOther(), llvm::MCELF::SetType(), llvm::MCELF::SetVisibility(), and llvm::MachObjectWriter::WriteNlist().
MCFragment* llvm::MCSymbolData::getFragment | ( | ) | const [inline] |
Definition at line 737 of file MCAssembler.h.
References Fragment.
Referenced by dump(), llvm::MCObjectStreamer::EmitLabel(), llvm::MCAssembler::getAtom(), getLabelOffset(), llvm::MachObjectWriter::getSymbolAddress(), llvm::MCObjectWriter::IsSymbolRefDifferenceFullyResolved(), and llvm::MachObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl().
uint64_t llvm::MCSymbolData::getIndex | ( | ) | const [inline] |
getIndex - Get the (implementation defined) index.
Definition at line 796 of file MCAssembler.h.
References Index.
Referenced by dump(), and llvm::MachObjectWriter::WriteObject().
uint64_t llvm::MCSymbolData::getOffset | ( | ) | const [inline] |
Definition at line 740 of file MCAssembler.h.
References Offset.
Referenced by dump(), and getLabelOffset().
const MCExpr* llvm::MCSymbolData::getSize | ( | ) | const [inline] |
Definition at line 773 of file MCAssembler.h.
const MCSymbol& llvm::MCSymbolData::getSymbol | ( | ) | const [inline] |
Definition at line 735 of file MCAssembler.h.
References Symbol.
Referenced by dump(), llvm::MCELFStreamer::Flush(), llvm::MCAssembler::getAtom(), getLabelOffset(), llvm::MachObjectWriter::getSymbolAddress(), getSymbolOffsetImpl(), llvm::MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(), llvm::MachObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(), and llvm::MachObjectWriter::WriteNlist().
bool llvm::MCSymbolData::isCommon | ( | ) | const [inline] |
isCommon - Is this a 'common' symbol.
Definition at line 752 of file MCAssembler.h.
References CommonSize.
Referenced by dump(), getCommonAlignment(), getCommonSize(), getSymbolValue(), and llvm::MachObjectWriter::WriteNlist().
bool llvm::MCSymbolData::isExternal | ( | ) | const [inline] |
Definition at line 745 of file MCAssembler.h.
Referenced by dump(), getSymbolValue(), llvm::MachObjectWriter::WriteNlist(), and llvm::MachObjectWriter::WriteObject().
bool llvm::MCSymbolData::isPrivateExtern | ( | ) | const [inline] |
Definition at line 748 of file MCAssembler.h.
References IsExternal.
Referenced by dump(), and llvm::MachObjectWriter::WriteNlist().
void llvm::MCSymbolData::modifyFlags | ( | uint32_t | Value, |
uint32_t | Mask | ||
) | [inline] |
modifyFlags - Modify the flags via a mask
Definition at line 791 of file MCAssembler.h.
References Flags.
Referenced by llvm::MCWinCOFFStreamer::EmitCOFFSymbolStorageClass(), llvm::MCWinCOFFStreamer::EmitCOFFSymbolType(), and llvm::MCWinCOFFStreamer::EmitSymbolAttribute().
void llvm::MCSymbolData::setCommon | ( | uint64_t | Size, |
unsigned | Align | ||
) | [inline] |
setCommon - Mark this symbol as being 'common'.
Size | - The size of the symbol. |
Align | - The alignment of the symbol. |
Definition at line 758 of file MCAssembler.h.
References Align(), CommonAlign, and CommonSize.
Referenced by llvm::MCWinCOFFStreamer::EmitCommonSymbol(), and llvm::MCELFStreamer::EmitCommonSymbol().
void llvm::MCSymbolData::setExternal | ( | bool | Value | ) | [inline] |
Definition at line 746 of file MCAssembler.h.
References IsExternal.
Referenced by llvm::MCWinCOFFStreamer::EmitCommonSymbol(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MCELFStreamer::EmitLocalCommonSymbol(), llvm::MCWinCOFFStreamer::EmitSymbolAttribute(), and llvm::MCELFStreamer::EmitSymbolAttribute().
void llvm::MCSymbolData::setFlags | ( | uint32_t | Value | ) | [inline] |
setFlags - Set the (implementation defined) symbol flags.
Definition at line 788 of file MCAssembler.h.
References Flags.
Referenced by llvm::MachObjectWriter::BindIndirectSymbols(), llvm::MCELF::SetBinding(), llvm::MCELF::setOther(), llvm::MCELF::SetType(), and llvm::MCELF::SetVisibility().
void llvm::MCSymbolData::setFragment | ( | MCFragment * | Value | ) | [inline] |
Definition at line 738 of file MCAssembler.h.
References Fragment.
Referenced by llvm::MCObjectStreamer::EmitLabel(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), and llvm::MCELFStreamer::Flush().
void llvm::MCSymbolData::setIndex | ( | uint64_t | Value | ) | [inline] |
setIndex - Set the (implementation defined) index.
Definition at line 799 of file MCAssembler.h.
References Index.
void llvm::MCSymbolData::setOffset | ( | uint64_t | Value | ) | [inline] |
Definition at line 741 of file MCAssembler.h.
References Offset.
Referenced by llvm::MCObjectStreamer::EmitLabel().
void llvm::MCSymbolData::setPrivateExtern | ( | bool | Value | ) | [inline] |
Definition at line 749 of file MCAssembler.h.
References IsPrivateExtern.
void llvm::MCSymbolData::setSize | ( | const MCExpr * | SS | ) | [inline] |
Definition at line 769 of file MCAssembler.h.
Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), and llvm::MCELFStreamer::EmitELFSize().
CommonAlign - The alignment of the symbol, if it is 'common'.
Definition at line 717 of file MCAssembler.h.
Referenced by getCommonAlignment(), and setCommon().
uint64_t llvm::MCSymbolData::CommonSize |
CommonSize - The size of the symbol, if it is 'common', or 0.
Definition at line 708 of file MCAssembler.h.
Referenced by getCommonSize(), isCommon(), and setCommon().
uint32_t llvm::MCSymbolData::Flags |
Flags - The Flags field is used by object file implementations to store additional per symbol information which is not easily classified.
Definition at line 721 of file MCAssembler.h.
Referenced by getFlags(), modifyFlags(), and setFlags().
Fragment - The fragment this symbol's value is relative to, if any.
Definition at line 691 of file MCAssembler.h.
Referenced by getFragment(), and setFragment().
uint64_t llvm::MCSymbolData::Index |
Index - Index field, for use by the object file implementation.
Definition at line 724 of file MCAssembler.h.
Referenced by getIndex(), and setIndex().
IsExternal - True if this symbol is visible outside this translation unit.
Definition at line 699 of file MCAssembler.h.
Referenced by isPrivateExtern(), and setExternal().
IsPrivateExtern - True if this symbol is private extern.
Definition at line 702 of file MCAssembler.h.
Referenced by setPrivateExtern().
uint64_t llvm::MCSymbolData::Offset |
Offset - The offset to apply to the fragment address to form this symbol's value.
Definition at line 695 of file MCAssembler.h.
Referenced by getOffset(), and setOffset().
Definition at line 688 of file MCAssembler.h.
Referenced by llvm::MachObjectWriter::doesSymbolRequireExternRelocation(), and getSymbol().
SymbolSize - An expression describing how to calculate the size of a symbol. If a symbol has no size this field will be NULL.
Definition at line 712 of file MCAssembler.h.