|
LLVM
5.0.0
|
#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... | |
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 58 of file ModuleSymbolTable.cpp.
References assert(), Flags, llvm::Module::getTargetTriple(), llvm::Module::global_values(), 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 147 of file ModuleSymbolTable.cpp.
References llvm::SourceMgr::AddNewSourceBuffer(), assert(), llvm::createMCAsmParser(), llvm::CodeModel::Default, llvm::RecordStreamer::Defined, llvm::RecordStreamer::DefinedGlobal, llvm::RecordStreamer::DefinedWeak, llvm::StringRef::empty(), llvm::MemoryBuffer::getMemBuffer(), llvm::Module::getModuleInlineAsm(), llvm::Module::getTargetTriple(), llvm::RecordStreamer::Global, handleSymverAliases(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm_unreachable(), llvm::TargetRegistry::lookupTarget(), MRI, llvm::RecordStreamer::NeverSeen, llvm::object::BasicSymbolRef::SF_Executable, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Undefined, llvm::object::BasicSymbolRef::SF_Weak, llvm::SrcMgr, llvm::RecordStreamer::UndefinedWeak, and llvm::RecordStreamer::Used.
Referenced by llvm::buildModuleSummaryIndex(), and llvm::thinLTOInternalizeModule().
Definition at line 243 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.
| void ModuleSymbolTable::printSymbolName | ( | raw_ostream & | OS, |
| Symbol | S | ||
| ) | const |
Definition at line 230 of file ModuleSymbolTable.cpp.
References first, llvm::PointerUnion< PT1, PT2 >::get(), and llvm::PointerUnion< PT1, PT2 >::is().
Definition at line 46 of file ModuleSymbolTable.h.
1.8.6