LLVM
8.0.1
|
#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. More... | |
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. More... | |
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 57 of file ModuleSymbolTable.cpp.
References assert(), llvm::Module::getTargetTriple(), llvm::Module::global_values(), and Name.
Referenced by symbols().
|
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 126 of file ModuleSymbolTable.cpp.
References llvm::RecordStreamer::Defined, llvm::RecordStreamer::DefinedGlobal, llvm::RecordStreamer::DefinedWeak, llvm::RecordStreamer::flushSymverDirectives(), llvm::RecordStreamer::Global, initializeRecordStreamer(), llvm_unreachable, 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, and llvm::RecordStreamer::Used.
Referenced by llvm::buildModuleSummaryIndex(), and symbols().
|
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 163 of file ModuleSymbolTable.cpp.
References initializeRecordStreamer(), and llvm::RecordStreamer::symverAliases().
Referenced by symbols().
Definition at line 185 of file ModuleSymbolTable.cpp.
References llvm::PointerUnion< PT1, PT2 >::get(), llvm::PointerUnion< PT1, PT2 >::is(), second, 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 symbols().
void ModuleSymbolTable::printSymbolName | ( | raw_ostream & | OS, |
Symbol | S | ||
) | const |
Definition at line 172 of file ModuleSymbolTable.cpp.
References first, llvm::PointerUnion< PT1, PT2 >::get(), and llvm::PointerUnion< PT1, PT2 >::is().
Referenced by symbols().
Definition at line 46 of file ModuleSymbolTable.h.
References addModule(), CollectAsmSymbols(), CollectAsmSymvers(), getSymbolFlags(), and printSymbolName().