LLVM 20.0.0git
|
#include "llvm/Object/ModuleSymbolTable.h"
Public Types | |
using | AsmSymbol = std::pair< std::string, uint32_t > |
using | Symbol = PointerUnion< GlobalValue *, AsmSymbol * > |
Public Member Functions | |
ArrayRef< Symbol > | symbols () const |
void | addModule (Module *M) |
void | printSymbolName (raw_ostream &OS, Symbol S) const |
uint32_t | getSymbolFlags (Symbol S) const |
Static Public Member Functions | |
static 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 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. | |
Definition at line 33 of file ModuleSymbolTable.h.
using llvm::ModuleSymbolTable::AsmSymbol = std::pair<std::string, uint32_t> |
Definition at line 35 of file ModuleSymbolTable.h.
using llvm::ModuleSymbolTable::Symbol = PointerUnion<GlobalValue *, AsmSymbol *> |
Definition at line 36 of file ModuleSymbolTable.h.
void ModuleSymbolTable::addModule | ( | Module * | M | ) |
Definition at line 52 of file ModuleSymbolTable.cpp.
References llvm::SpecificBumpPtrAllocator< T >::Allocate(), assert(), CollectAsmSymbols(), llvm::Module::getTargetTriple(), and Name.
|
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 140 of file ModuleSymbolTable.cpp.
References llvm::RecordStreamer::Defined, llvm::RecordStreamer::DefinedGlobal, llvm::RecordStreamer::DefinedWeak, llvm::RecordStreamer::flushSymverDirectives(), llvm::RecordStreamer::Global, initializeRecordStreamer(), 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().
|
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 191 of file ModuleSymbolTable.cpp.
References for(), initializeRecordStreamer(), and llvm::RecordStreamer::symverAliases().
Definition at line 213 of file ModuleSymbolTable.cpp.
References llvm::GlobalValue::getAliaseeObject(), 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.
Referenced by llvm::object::IRObjectFile::getSymbolFlags().
void ModuleSymbolTable::printSymbolName | ( | raw_ostream & | OS, |
Symbol | S | ||
) | const |
Definition at line 200 of file ModuleSymbolTable.cpp.
References llvm::Mangler::getNameWithPrefix(), and OS.
Referenced by llvm::object::IRObjectFile::printSymbolName().
Definition at line 46 of file ModuleSymbolTable.h.
Referenced by llvm::LTOModule::hasCtorDtor(), llvm::object::IRObjectFile::symbol_begin(), and llvm::object::IRObjectFile::symbol_end().