LLVM
17.0.0git
|
#include "llvm/MC/MCSymbolWasm.h"
Public Member Functions | |
MCSymbolWasm (const StringMapEntry< bool > *Name, bool isTemporary) | |
const MCExpr * | getSize () const |
void | setSize (const MCExpr *SS) |
bool | isFunction () const |
bool | isData () const |
bool | isGlobal () const |
bool | isTable () const |
bool | isSection () const |
bool | isTag () const |
std::optional< wasm::WasmSymbolType > | getType () const |
void | setType (wasm::WasmSymbolType type) |
bool | isExported () const |
void | setExported () const |
bool | isNoStrip () const |
void | setNoStrip () const |
bool | isTLS () const |
void | setTLS () const |
bool | isWeak () const |
void | setWeak (bool isWeak) |
bool | isHidden () const |
void | setHidden (bool isHidden) |
bool | isComdat () const |
void | setComdat (bool isComdat) |
bool | omitFromLinkingSection () const |
void | setOmitFromLinkingSection () |
bool | hasImportModule () const |
StringRef | getImportModule () const |
void | setImportModule (StringRef Name) |
bool | hasImportName () const |
StringRef | getImportName () const |
void | setImportName (StringRef Name) |
bool | hasExportName () const |
StringRef | getExportName () const |
void | setExportName (StringRef Name) |
bool | isFunctionTable () const |
void | setFunctionTable () |
void | setUsedInGOT () const |
bool | isUsedInGOT () const |
void | setUsedInInitArray () const |
bool | isUsedInInitArray () const |
const wasm::WasmSignature * | getSignature () const |
void | setSignature (wasm::WasmSignature *Sig) |
const wasm::WasmGlobalType & | getGlobalType () const |
void | setGlobalType (wasm::WasmGlobalType GT) |
bool | hasTableType () const |
const wasm::WasmTableType & | getTableType () const |
void | setTableType (wasm::WasmTableType TT) |
void | setTableType (wasm::ValType VT) |
![]() | |
MCSymbol (const MCSymbol &)=delete | |
MCSymbol & | operator= (const MCSymbol &)=delete |
StringRef | getName () const |
getName - Get the symbol name. More... | |
bool | isRegistered () const |
void | setIsRegistered (bool Value) const |
void | setUsedInReloc () const |
bool | isUsedInReloc () const |
uint32_t | getIndex () const |
Get the (implementation defined) index. More... | |
void | setIndex (uint32_t Value) const |
Set the (implementation defined) index. More... | |
bool | isUnset () const |
uint64_t | getOffset () const |
void | setOffset (uint64_t Value) |
uint64_t | getCommonSize () const |
Return the size of a 'common' symbol. More... | |
void | setCommon (uint64_t Size, Align Alignment, bool Target=false) |
Mark this symbol as being 'common'. More... | |
MaybeAlign | getCommonAlignment () const |
Return the alignment of a 'common' symbol. More... | |
bool | declareCommon (uint64_t Size, Align Alignment, bool Target=false) |
Declare this symbol as being 'common'. More... | |
bool | isCommon () const |
Is this a 'common' symbol. More... | |
bool | isTargetCommon () const |
Is this a target-specific common-like symbol. More... | |
MCFragment * | getFragment (bool SetUsed=true) const |
bool | isExternal () const |
void | setExternal (bool Value) const |
bool | isPrivateExtern () const |
void | setPrivateExtern (bool Value) |
void | print (raw_ostream &OS, const MCAsmInfo *MAI) const |
print - Print the value to the stream OS . More... | |
void | dump () const |
dump - Print the value to stderr. More... | |
bool | isTemporary () const |
isTemporary - Check if this is an assembler temporary symbol. More... | |
bool | isUsed () const |
isUsed - Check if this is used. More... | |
bool | isRedefinable () const |
Check if this symbol is redefinable. More... | |
void | setRedefinable (bool Value) |
Mark this symbol as redefinable. More... | |
void | redefineIfPossible () |
Prepare this symbol to be redefined. More... | |
bool | isDefined () const |
isDefined - Check if this symbol is defined (i.e., it has an address). More... | |
bool | isInSection () const |
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute). More... | |
bool | isUndefined (bool SetUsed=true) const |
isUndefined - Check if this symbol undefined (i.e., implicitly defined). More... | |
bool | isAbsolute () const |
isAbsolute - Check if this is an absolute symbol. More... | |
MCSection & | getSection () const |
Get the section associated with a defined, non-absolute symbol. More... | |
void | setFragment (MCFragment *F) const |
Mark the symbol as defined in the fragment F . More... | |
void | setUndefined () |
Mark the symbol as undefined. More... | |
bool | isELF () const |
bool | isCOFF () const |
bool | isGOFF () const |
bool | isMachO () const |
bool | isWasm () const |
bool | isXCOFF () const |
bool | isVariable () const |
isVariable - Check if this is a variable symbol. More... | |
const MCExpr * | getVariableValue (bool SetUsed=true) const |
getVariableValue - Get the value for variable symbols. More... | |
void | setVariableValue (const MCExpr *Value) |
Static Public Member Functions | |
static bool | classof (const MCSymbol *S) |
Additional Inherited Members | |
![]() | |
enum | SymbolKind { SymbolKindUnset, SymbolKindCOFF, SymbolKindELF, SymbolKindGOFF, SymbolKindMachO, SymbolKindWasm, SymbolKindXCOFF } |
The kind of the symbol. More... | |
enum | Contents : uint8_t { SymContentsUnset, SymContentsOffset, SymContentsVariable, SymContentsCommon, SymContentsTargetCommon } |
A symbol can contain an Offset, or Value, or be Common, but never more than one of these. More... | |
enum | : unsigned { NumCommonAlignmentBits = 5 } |
The alignment of the symbol if it is 'common'. More... | |
enum | : unsigned { NumFlagsBits = 16 } |
The Flags field is used by object file implementations to store additional per symbol information which is not easily classified. More... | |
using | NameEntryStorageTy = union { const StringMapEntry< bool > *NameEntry |
The name for a symbol. More... | |
![]() | |
MCSymbol (SymbolKind Kind, const StringMapEntry< bool > *Name, bool isTemporary) | |
void * | operator new (size_t s, const StringMapEntry< bool > *Name, MCContext &Ctx) |
uint32_t | getFlags () const |
Get the (implementation defined) symbol flags. More... | |
void | setFlags (uint32_t Value) const |
Set the (implementation defined) symbol flags. More... | |
void | modifyFlags (uint32_t Value, uint32_t Mask) const |
Modify the flags via a mask. More... | |
![]() | |
PointerIntPair< MCFragment *, 1 > | FragmentAndHasName |
If a symbol has a Fragment, the section is implied, so we only need one pointer. More... | |
unsigned | IsTemporary: 1 |
IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table. More... | |
unsigned | IsRedefinable: 1 |
True if this symbol can be redefined. More... | |
unsigned | IsUsed: 1 |
IsUsed - True if this symbol has been used. More... | |
unsigned | IsRegistered: 1 |
unsigned | IsExternal: 1 |
True if this symbol is visible outside this translation unit. More... | |
unsigned | IsPrivateExtern: 1 |
This symbol is private extern. More... | |
unsigned | Kind: 3 |
LLVM RTTI discriminator. More... | |
unsigned | IsUsedInReloc: 1 |
True if we have created a relocation that uses this symbol. More... | |
unsigned | SymbolContents: 3 |
This is actually a Contents enumerator, but is unsigned to avoid sign extension and achieve better bitpacking with MSVC. More... | |
unsigned | CommonAlignLog2: NumCommonAlignmentBits |
uint32_t | Flags: NumFlagsBits |
uint32_t | Index = 0 |
Index field, for use by the object file implementation. More... | |
union { | |
uint64_t Offset | |
The offset to apply to the fragment address to form this symbol's value. More... | |
uint64_t CommonSize | |
The size of the symbol, if it is 'common'. More... | |
const MCExpr * Value | |
If non-null, the value for a variable symbol. More... | |
}; | |
uint64_t | AlignmentPadding |
![]() | |
static MCFragment * | AbsolutePseudoFragment = &SentinelFragment |
Definition at line 16 of file MCSymbolWasm.h.
|
inline |
Definition at line 36 of file MCSymbolWasm.h.
Definition at line 38 of file MCSymbolWasm.h.
References S.
|
inline |
Definition at line 110 of file MCSymbolWasm.h.
|
inline |
Definition at line 131 of file MCSymbolWasm.h.
References assert().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitGlobalType().
|
inline |
Definition at line 90 of file MCSymbolWasm.h.
|
inline |
Definition at line 102 of file MCSymbolWasm.h.
References llvm::MCSymbol::getName().
|
inline |
Definition at line 128 of file MCSymbolWasm.h.
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitFunctionType(), and llvm::WebAssemblyTargetAsmStreamer::emitTagType().
Definition at line 40 of file MCSymbolWasm.h.
|
inline |
Definition at line 138 of file MCSymbolWasm.h.
References assert(), and hasTableType().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTableType(), and isFunctionTable().
|
inline |
Definition at line 51 of file MCSymbolWasm.h.
Referenced by llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::WebAssemblyAsmPrinter::emitSymbolType(), and llvm::WebAssembly::wasmSymbolSetType().
|
inline |
Definition at line 109 of file MCSymbolWasm.h.
|
inline |
Definition at line 89 of file MCSymbolWasm.h.
|
inline |
Definition at line 101 of file MCSymbolWasm.h.
|
inline |
Definition at line 137 of file MCSymbolWasm.h.
Referenced by getTableType(), and isFunctionTable().
|
inline |
Definition at line 80 of file MCSymbolWasm.h.
Referenced by isInSymtab(), and setComdat().
|
inline |
Definition at line 45 of file MCSymbolWasm.h.
References llvm::wasm::WASM_SYMBOL_TYPE_DATA.
|
inline |
Definition at line 55 of file MCSymbolWasm.h.
References llvm::MCSymbol::getFlags(), and llvm::wasm::WASM_SYMBOL_EXPORTED.
|
inline |
Definition at line 43 of file MCSymbolWasm.h.
References llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION.
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitFunctionType().
|
inline |
Definition at line 113 of file MCSymbolWasm.h.
References llvm::wasm::WasmTableType::ElemType, getTableType(), hasTableType(), isTable(), and llvm::wasm::WASM_TYPE_FUNCREF.
Referenced by llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), and llvm::WebAssembly::getOrCreateFunctionTableSymbol().
|
inline |
Definition at line 46 of file MCSymbolWasm.h.
References llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL.
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitGlobalType().
|
inline |
Definition at line 77 of file MCSymbolWasm.h.
Referenced by setHidden().
|
inline |
Definition at line 62 of file MCSymbolWasm.h.
References llvm::MCSymbol::getFlags(), and llvm::wasm::WASM_SYMBOL_NO_STRIP.
|
inline |
Definition at line 48 of file MCSymbolWasm.h.
References llvm::wasm::WASM_SYMBOL_TYPE_SECTION.
Referenced by isInSymtab().
|
inline |
Definition at line 47 of file MCSymbolWasm.h.
References llvm::wasm::WASM_SYMBOL_TYPE_TABLE.
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTableType(), and isFunctionTable().
|
inline |
Definition at line 49 of file MCSymbolWasm.h.
References llvm::wasm::WASM_SYMBOL_TYPE_TAG.
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTagType().
|
inline |
Definition at line 69 of file MCSymbolWasm.h.
References llvm::MCSymbol::getFlags(), and llvm::wasm::WASM_SYMBOL_TLS.
|
inline |
Definition at line 123 of file MCSymbolWasm.h.
|
inline |
Definition at line 126 of file MCSymbolWasm.h.
Referenced by isInSymtab().
|
inline |
Definition at line 74 of file MCSymbolWasm.h.
Referenced by setWeak().
|
inline |
Definition at line 86 of file MCSymbolWasm.h.
Referenced by isInSymtab().
|
inline |
Definition at line 81 of file MCSymbolWasm.h.
References isComdat().
Referenced by llvm::MCContext::getWasmSection().
|
inline |
Definition at line 58 of file MCSymbolWasm.h.
References llvm::MCSymbol::modifyFlags(), and llvm::wasm::WASM_SYMBOL_EXPORTED.
|
inline |
Definition at line 111 of file MCSymbolWasm.h.
|
inline |
Definition at line 117 of file MCSymbolWasm.h.
References llvm::wasm::FUNCREF, setTableType(), setType(), and llvm::wasm::WASM_SYMBOL_TYPE_TABLE.
Referenced by llvm::WebAssembly::getOrCreateFunctionTableSymbol().
|
inline |
Definition at line 135 of file MCSymbolWasm.h.
References llvm::AArch64CC::GT.
Referenced by llvm::WebAssembly::wasmSymbolSetType().
|
inline |
Definition at line 78 of file MCSymbolWasm.h.
References isHidden().
|
inline |
Definition at line 99 of file MCSymbolWasm.h.
|
inline |
Definition at line 107 of file MCSymbolWasm.h.
|
inline |
Definition at line 65 of file MCSymbolWasm.h.
References llvm::MCSymbol::modifyFlags(), and llvm::wasm::WASM_SYMBOL_NO_STRIP.
Referenced by LowerCallResults().
|
inline |
Definition at line 87 of file MCSymbolWasm.h.
Referenced by llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), and llvm::WebAssembly::getOrCreateFunctionTableSymbol().
|
inline |
Definition at line 129 of file MCSymbolWasm.h.
Definition at line 41 of file MCSymbolWasm.h.
References llvm::X86AS::SS.
|
inline |
Definition at line 143 of file MCSymbolWasm.h.
References setTableType(), and llvm::wasm::WASM_LIMITS_FLAG_NONE.
|
inline |
Definition at line 142 of file MCSymbolWasm.h.
Referenced by llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), setFunctionTable(), setTableType(), and llvm::WebAssembly::wasmSymbolSetType().
|
inline |
Definition at line 70 of file MCSymbolWasm.h.
References llvm::MCSymbol::modifyFlags(), and llvm::wasm::WASM_SYMBOL_TLS.
|
inline |
Definition at line 53 of file MCSymbolWasm.h.
References type.
Referenced by llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), setFunctionTable(), and llvm::WebAssembly::wasmSymbolSetType().
|
inline |
Definition at line 122 of file MCSymbolWasm.h.
|
inline |
Definition at line 125 of file MCSymbolWasm.h.
|
inline |
Definition at line 75 of file MCSymbolWasm.h.
References isWeak().
Referenced by llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol().