LLVM 22.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::ModuleSymbolTable Class Reference

#include "llvm/Object/ModuleSymbolTable.h"

Public Types

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

Public Member Functions

Static Public Member Functions

  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

Definition at line 37 of file ModuleSymbolTable.h.

Member Function Documentation

◆  addModule()

void ModuleSymbolTable::addModule ( Module * M )

Definition at line 52 of file ModuleSymbolTable.cpp.

References assert(), and CollectAsmSymbols().

◆  CollectAsmSymbols()

void ModuleSymbolTable::CollectAsmSymbols ( const Module & M,
static

Parse inline ASM and collect the symbols that are defined or referenced in the current module.

For each found symbol, call AsmSymbol with the name of the symbol found and the associated flags.

Definition at line 139 of file ModuleSymbolTable.cpp.

References llvm::RecordStreamer::Defined, llvm::RecordStreamer::DefinedGlobal, llvm::RecordStreamer::DefinedWeak, llvm::RecordStreamer::flushSymverDirectives(), llvm::RecordStreamer::Global, initializeRecordStreamer(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, llvm::CodeModel::Large, llvm_unreachable, llvm::CodeModel::Medium, llvm::RecordStreamer::NeverSeen, llvm::object::BasicSymbolRef::SF_Executable, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Undefined, llvm::object::BasicSymbolRef::SF_Weak, llvm::RecordStreamer::UndefinedWeak, llvm::RecordStreamer::Used, and llvm::Triple::x86.

Referenced by addModule(), and llvm::buildModuleSummaryIndex().

◆  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()

uint32_t ModuleSymbolTable::getSymbolFlags ( Symbol S ) const

Definition at line 212 of file ModuleSymbolTable.cpp.

References llvm::cast(), llvm::dyn_cast(), llvm::GlobalValue::getAliaseeObject(), llvm::isa(), llvm::object::BasicSymbolRef::SF_Common, llvm::object::BasicSymbolRef::SF_Const, llvm::object::BasicSymbolRef::SF_Executable, llvm::object::BasicSymbolRef::SF_FormatSpecific, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Hidden, llvm::object::BasicSymbolRef::SF_Indirect, llvm::object::BasicSymbolRef::SF_None, llvm::object::BasicSymbolRef::SF_Undefined, and llvm::object::BasicSymbolRef::SF_Weak.

◆  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:

Generated on for LLVM by doxygen 1.14.0

AltStyle によって変換されたページ (->オリジナル) /