Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::MCSymbolWasm Class Reference

#include "llvm/MC/MCSymbolWasm.h"

Inheritance diagram for llvm::MCSymbolWasm:
[legend]

Public Member Functions

 MCSymbolWasm (const MCSymbolTableEntry *Name, bool isTemporary)
bool isExternal () const
void setExternal (bool Value) const
const MCExprgetSize () 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::WasmSymbolTypegetType () 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 (bool is64)
void setUsedInGOT () const
bool isUsedInGOT () const
void setUsedInInitArray () const
bool isUsedInInitArray () const
const wasm::WasmSignaturegetSignature () const
void setSignature (wasm::WasmSignature *Sig)
const wasm::WasmGlobalTypegetGlobalType () const
void setGlobalType (wasm::WasmGlobalType GT)
bool hasTableType () const
const wasm::WasmTableTypegetTableType () const
void setTableType (wasm::WasmTableType TT)
void setTableType (wasm::ValType VT, uint8_t flags=wasm::WASM_LIMITS_FLAG_NONE)
Public Member Functions inherited from llvm::MCSymbol
StringRef getName () const
 getName - Get the symbol name.
bool isRegistered () const
void setIsRegistered (bool Value) const
void setUsedInReloc () const
bool isUsedInReloc () const
uint32_t getIndex () const
 Get the (implementation defined) index.
void setIndex (uint32_t Value) const
 Set the (implementation defined) index.
uint64_t getOffset () const
void setOffset (uint64_t Value)
uint64_t getCommonSize () const
 Return the size of a 'common' symbol.
void setCommon (uint64_t Size, Align Alignment)
 Mark this symbol as being 'common'.
MaybeAlign getCommonAlignment () const
 Return the alignment of a 'common' symbol.
bool declareCommon (uint64_t Size, Align Alignment)
 Declare this symbol as being 'common'.
bool isCommon () const
 Is this a 'common' symbol.
MCFragmentgetFragment () const
bool isWeakExternal () const
LLVM_ABI void print (raw_ostream &OS, const MCAsmInfo *MAI) const
 print - Print the value to the stream OS.
LLVM_ABI void dump () const
 dump - Print the value to stderr.
bool isTemporary () const
 isTemporary - Check if this is an assembler temporary symbol.
bool isRedefinable () const
 Check if this symbol is redefinable.
void setRedefinable (bool Value)
 Mark this symbol as redefinable.
void redefineIfPossible ()
 Prepare this symbol to be redefined.
bool isResolving () const
void setIsResolving (bool V)
bool isDefined () const
 isDefined - Check if this symbol is defined (i.e., it has an address).
bool isInSection () const
 isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute).
bool isUndefined () const
 isUndefined - Check if this symbol undefined (i.e., implicitly defined).
bool isAbsolute () const
 isAbsolute - Check if this is an absolute symbol.
MCSectiongetSection () const
 Get the section associated with a defined, non-absolute symbol.
void setFragment (MCFragment *F) const
 Mark the symbol as defined in the fragment F.
bool isVariable () const
 isVariable - Check if this is a variable symbol.
const MCExprgetVariableValue () const
 Get the expression of the variable symbol.
LLVM_ABI void setVariableValue (const MCExpr *Value)

Additional Inherited Members

Protected Types inherited from llvm::MCSymbol
enum  Kind : uint8_t { Regular , Equated , Common }
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
 The name for a symbol.
Protected Member Functions inherited from llvm::MCSymbol
 MCSymbol (const MCSymbolTableEntry *Name, bool isTemporary)
 MCSymbol (const MCSymbol &)=default
MCSymboloperator= (const MCSymbol &)=delete
LLVM_ABI void * operator new (size_t s, const MCSymbolTableEntry *Name, MCContext &Ctx)
uint32_t getFlags () const
 Get the (implementation defined) symbol flags.
void setFlags (uint32_t Value) const
 Set the (implementation defined) symbol flags.
void modifyFlags (uint32_t Value, uint32_t Mask) const
 Modify the flags via a mask.
Protected Attributes inherited from llvm::MCSymbol
MCFragmentFragment = nullptr
 If a symbol has a Fragment, the section is implied, so we only need one pointer.
unsigned kind: 2
 The symbol kind.
unsigned HasName: 1
 True if this symbol is named.
unsigned IsTemporary: 1
 IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table.
unsigned IsRedefinable: 1
 True if this symbol can be redefined.
unsigned IsRegistered: 1
unsigned IsExternal: 1
 True if this symbol is visible outside this translation unit.
unsigned IsPrivateExtern: 1
 Mach-O specific: This symbol is private extern.
unsigned IsWeakExternal: 1
 This symbol is weak external.
unsigned IsUsedInReloc: 1
 True if we have created a relocation that uses this symbol.
unsigned IsResolving: 1
 Used to detect cyclic dependency like a = a + 1 and a = b; b = a.
unsigned CommonAlignLog2: NumCommonAlignmentBits
uint32_t Flags: NumFlagsBits
uint32_t Index = 0
 Index field, for use by the object file implementation.
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...
}; 
Static Protected Attributes inherited from llvm::MCSymbol
static LLVM_ABI MCFragmentAbsolutePseudoFragment = &SentinelFragment

Detailed Description

Definition at line 17 of file MCSymbolWasm.h.

Constructor & Destructor Documentation

◆ MCSymbolWasm()

llvm::MCSymbolWasm::MCSymbolWasm ( const MCSymbolTableEntry * Name,
bool isTemporary )
inline

Definition at line 37 of file MCSymbolWasm.h.

References llvm::MCSymbol::isTemporary(), and llvm::MCSymbol::MCSymbol().

Member Function Documentation

◆ getExportName()

StringRef llvm::MCSymbolWasm::getExportName ( ) const
inline

Definition at line 112 of file MCSymbolWasm.h.

◆ getGlobalType()

const wasm::WasmGlobalType & llvm::MCSymbolWasm::getGlobalType ( ) const
inline

Definition at line 135 of file MCSymbolWasm.h.

References assert().

Referenced by llvm::WebAssemblyTargetAsmStreamer::emitGlobalType().

◆ getImportModule()

StringRef llvm::MCSymbolWasm::getImportModule ( ) const
inline

Definition at line 92 of file MCSymbolWasm.h.

◆ getImportName()

StringRef llvm::MCSymbolWasm::getImportName ( ) const
inline

Definition at line 104 of file MCSymbolWasm.h.

References llvm::MCSymbol::getName().

◆ getSignature()

const wasm::WasmSignature * llvm::MCSymbolWasm::getSignature ( ) const
inline

◆ getSize()

const MCExpr * llvm::MCSymbolWasm::getSize ( ) const
inline

Definition at line 42 of file MCSymbolWasm.h.

References llvm::MCSymbol::MCExpr.

◆ getTableType()

const wasm::WasmTableType & llvm::MCSymbolWasm::getTableType ( ) const
inline

Definition at line 142 of file MCSymbolWasm.h.

References assert(), and hasTableType().

Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTableType(), and isFunctionTable().

◆ getType()

std::optional< wasm::WasmSymbolType > llvm::MCSymbolWasm::getType ( ) const
inline

◆ hasExportName()

bool llvm::MCSymbolWasm::hasExportName ( ) const
inline

Definition at line 111 of file MCSymbolWasm.h.

◆ hasImportModule()

bool llvm::MCSymbolWasm::hasImportModule ( ) const
inline

Definition at line 91 of file MCSymbolWasm.h.

◆ hasImportName()

bool llvm::MCSymbolWasm::hasImportName ( ) const
inline

Definition at line 103 of file MCSymbolWasm.h.

◆ hasTableType()

bool llvm::MCSymbolWasm::hasTableType ( ) const
inline

Definition at line 141 of file MCSymbolWasm.h.

Referenced by getTableType(), and isFunctionTable().

◆ isComdat()

bool llvm::MCSymbolWasm::isComdat ( ) const
inline

Definition at line 82 of file MCSymbolWasm.h.

Referenced by isInSymtab(), and setComdat().

◆ isData()

bool llvm::MCSymbolWasm::isData ( ) const
inline

Definition at line 47 of file MCSymbolWasm.h.

References llvm::wasm::WASM_SYMBOL_TYPE_DATA.

◆ isExported()

bool llvm::MCSymbolWasm::isExported ( ) const
inline

Definition at line 57 of file MCSymbolWasm.h.

References llvm::MCSymbol::getFlags(), and llvm::wasm::WASM_SYMBOL_EXPORTED.

◆ isExternal()

bool llvm::MCSymbolWasm::isExternal ( ) const
inline

Definition at line 40 of file MCSymbolWasm.h.

References llvm::MCSymbol::IsExternal.

◆ isFunction()

bool llvm::MCSymbolWasm::isFunction ( ) const
inline

◆ isFunctionTable()

bool llvm::MCSymbolWasm::isFunctionTable ( ) const
inline

◆ isGlobal()

bool llvm::MCSymbolWasm::isGlobal ( ) const
inline

◆ isHidden()

bool llvm::MCSymbolWasm::isHidden ( ) const
inline

Definition at line 79 of file MCSymbolWasm.h.

Referenced by setHidden().

◆ isNoStrip()

bool llvm::MCSymbolWasm::isNoStrip ( ) const
inline

Definition at line 64 of file MCSymbolWasm.h.

References llvm::MCSymbol::getFlags(), and llvm::wasm::WASM_SYMBOL_NO_STRIP.

◆ isSection()

bool llvm::MCSymbolWasm::isSection ( ) const
inline

Definition at line 50 of file MCSymbolWasm.h.

References llvm::wasm::WASM_SYMBOL_TYPE_SECTION.

Referenced by isInSymtab().

◆ isTable()

bool llvm::MCSymbolWasm::isTable ( ) const
inline

◆ isTag()

bool llvm::MCSymbolWasm::isTag ( ) const
inline

◆ isTLS()

bool llvm::MCSymbolWasm::isTLS ( ) const
inline

Definition at line 71 of file MCSymbolWasm.h.

References llvm::MCSymbol::getFlags(), and llvm::wasm::WASM_SYMBOL_TLS.

◆ isUsedInGOT()

bool llvm::MCSymbolWasm::isUsedInGOT ( ) const
inline

Definition at line 127 of file MCSymbolWasm.h.

◆ isUsedInInitArray()

bool llvm::MCSymbolWasm::isUsedInInitArray ( ) const
inline

Definition at line 130 of file MCSymbolWasm.h.

Referenced by isInSymtab().

◆ isWeak()

bool llvm::MCSymbolWasm::isWeak ( ) const
inline

Definition at line 76 of file MCSymbolWasm.h.

Referenced by setWeak().

◆ omitFromLinkingSection()

bool llvm::MCSymbolWasm::omitFromLinkingSection ( ) const
inline

Definition at line 88 of file MCSymbolWasm.h.

Referenced by isInSymtab().

◆ setComdat()

void llvm::MCSymbolWasm::setComdat ( bool isComdat)
inline

Definition at line 83 of file MCSymbolWasm.h.

References isComdat().

Referenced by llvm::MCContext::getWasmSection().

◆ setExported()

void llvm::MCSymbolWasm::setExported ( ) const
inline

◆ setExportName()

void llvm::MCSymbolWasm::setExportName ( StringRef Name)
inline

Definition at line 113 of file MCSymbolWasm.h.

◆ setExternal()

void llvm::MCSymbolWasm::setExternal ( bool Value) const
inline

Definition at line 41 of file MCSymbolWasm.h.

References llvm::MCSymbol::IsExternal, and llvm::MCSymbol::Value.

◆ setFunctionTable()

◆ setGlobalType()

void llvm::MCSymbolWasm::setGlobalType ( wasm::WasmGlobalType GT)
inline

Definition at line 139 of file MCSymbolWasm.h.

Referenced by llvm::WebAssembly::wasmSymbolSetType().

◆ setHidden()

void llvm::MCSymbolWasm::setHidden ( bool isHidden)
inline

Definition at line 80 of file MCSymbolWasm.h.

References isHidden().

◆ setImportModule()

void llvm::MCSymbolWasm::setImportModule ( StringRef Name)
inline

Definition at line 101 of file MCSymbolWasm.h.

◆ setImportName()

void llvm::MCSymbolWasm::setImportName ( StringRef Name)
inline

Definition at line 109 of file MCSymbolWasm.h.

◆ setNoStrip()

void llvm::MCSymbolWasm::setNoStrip ( ) const
inline

Definition at line 67 of file MCSymbolWasm.h.

References llvm::MCSymbol::modifyFlags(), and llvm::wasm::WASM_SYMBOL_NO_STRIP.

Referenced by LowerCallResults().

◆ setOmitFromLinkingSection()

void llvm::MCSymbolWasm::setOmitFromLinkingSection ( )
inline

◆ setSignature()

void llvm::MCSymbolWasm::setSignature ( wasm::WasmSignature * Sig)
inline

Definition at line 133 of file MCSymbolWasm.h.

Referenced by llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart().

◆ setSize()

void llvm::MCSymbolWasm::setSize ( const MCExpr * SS)
inline

Definition at line 43 of file MCSymbolWasm.h.

References llvm::MCSymbol::MCExpr.

◆ setTableType() [1/2]

void llvm::MCSymbolWasm::setTableType ( wasm::ValType VT,
uint8_t flags = wasm::WASM_LIMITS_FLAG_NONE )
inline

Definition at line 147 of file MCSymbolWasm.h.

References setTableType(), and llvm::wasm::WASM_LIMITS_FLAG_NONE.

◆ setTableType() [2/2]

void llvm::MCSymbolWasm::setTableType ( wasm::WasmTableType TT)
inline

◆ setTLS()

void llvm::MCSymbolWasm::setTLS ( ) const
inline

Definition at line 72 of file MCSymbolWasm.h.

References llvm::MCSymbol::modifyFlags(), and llvm::wasm::WASM_SYMBOL_TLS.

◆ setType()

void llvm::MCSymbolWasm::setType ( wasm::WasmSymbolType type)
inline

◆ setUsedInGOT()

void llvm::MCSymbolWasm::setUsedInGOT ( ) const
inline

Definition at line 126 of file MCSymbolWasm.h.

◆ setUsedInInitArray()

void llvm::MCSymbolWasm::setUsedInInitArray ( ) const
inline

Definition at line 129 of file MCSymbolWasm.h.

◆ setWeak()

void llvm::MCSymbolWasm::setWeak ( bool isWeak)
inline

Definition at line 77 of file MCSymbolWasm.h.

References isWeak().

Referenced by llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol().


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