LLVM 22.0.0git
llvm::ModuleSymbolTable Class Reference

#include "llvm/Object/ModuleSymbolTable.h"

Public Types

using AsmSymbol = std::pair<std::string, uint32_t>
using Symbol = PointerUnion<GlobalValue *, AsmSymbol *>

Public Member Functions

ArrayRef< Symbolsymbols () const
LLVM_ABI void addModule (Module *M)
LLVM_ABI void printSymbolName (raw_ostream &OS, Symbol S) const
LLVM_ABI uint32_t getSymbolFlags (Symbol S) const

Static Public Member Functions

static LLVM_ABI void CollectAsmSymbols (const Module &M, function_ref< void(StringRef, object::BasicSymbolRef::Flags)> AsmSymbol)
 Parse inline ASM and collect the symbols that are defined or referenced in the current module.
static LLVM_ABI void CollectAsmSymvers (const Module &M, function_ref< void(StringRef, StringRef)> AsmSymver)
 Parse inline ASM and collect the symvers directives that are defined in the current module.

Detailed Description

Definition at line 34 of file ModuleSymbolTable.h.

Member Typedef Documentation

◆ AsmSymbol

using llvm::ModuleSymbolTable::AsmSymbol = std::pair<std::string, uint32_t>

Definition at line 36 of file ModuleSymbolTable.h.

◆ Symbol

Member Function Documentation

◆ addModule()

void ModuleSymbolTable::addModule ( Module * M)

Definition at line 52 of file ModuleSymbolTable.cpp.

References assert(), and CollectAsmSymbols().

◆ CollectAsmSymbols()

◆ CollectAsmSymvers()

void ModuleSymbolTable::CollectAsmSymvers ( const Module & M,
function_ref< void(StringRef, StringRef)> AsmSymver )
static

Parse inline ASM and collect the symvers directives that are defined in the current module.

For each found symbol, call AsmSymver with the name of the symbol and its alias.

Definition at line 190 of file ModuleSymbolTable.cpp.

References initializeRecordStreamer(), and llvm::RecordStreamer::symverAliases().

◆ getSymbolFlags()

◆ printSymbolName()

void ModuleSymbolTable::printSymbolName ( raw_ostream & OS,
Symbol S ) const

Definition at line 199 of file ModuleSymbolTable.cpp.

References llvm::cast(), and llvm::isa().

◆ symbols()

ArrayRef< Symbol > llvm::ModuleSymbolTable::symbols ( ) const
inline

Definition at line 47 of file ModuleSymbolTable.h.


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