LLVM API Documentation
#include <IRObjectFile.h>
Public Member Functions | |
IRObjectFile (MemoryBufferRef Object, std::unique_ptr< Module > M) | |
~IRObjectFile () | |
void | moveSymbolNext (DataRefImpl &Symb) const override |
std::error_code | printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override |
uint32_t | getSymbolFlags (DataRefImpl Symb) const override |
const GlobalValue * | getSymbolGV (DataRefImpl Symb) const |
basic_symbol_iterator | symbol_begin_impl () const override |
basic_symbol_iterator | symbol_end_impl () const override |
const Module & | getModule () const |
Module & | getModule () |
Static Public Member Functions | |
static bool | classof (const Binary *v) |
static ErrorOr < std::unique_ptr < IRObjectFile > > | createIRObjectFile (MemoryBufferRef Object, LLVMContext &Context) |
Definition at line 25 of file IRObjectFile.h.
IRObjectFile::IRObjectFile | ( | MemoryBufferRef | Object, |
std::unique_ptr< Module > | M | ||
) |
Definition at line 35 of file IRObjectFile.cpp.
References llvm::SourceMgr::AddNewSourceBuffer(), llvm::Target::createMCAsmInfo(), llvm::createMCAsmParser(), llvm::Target::createMCAsmParser(), llvm::Target::createMCInstrInfo(), llvm::Target::createMCRegInfo(), llvm::Target::createMCSubtargetInfo(), llvm::Reloc::Default, llvm::CodeModel::Default, llvm::RecordStreamer::Defined, llvm::RecordStreamer::DefinedGlobal, llvm::MemoryBuffer::getMemBuffer(), llvm::RecordStreamer::Global, llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm_unreachable, llvm::TargetRegistry::lookupTarget(), llvm::RecordStreamer::NeverSeen, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_None, llvm::object::BasicSymbolRef::SF_Undefined, llvm::SrcMgr, and llvm::RecordStreamer::Used.
Definition at line 115 of file IRObjectFile.cpp.
static bool llvm::object::IRObjectFile::classof | ( | const Binary * | v | ) | [inline, static] |
Reimplemented from llvm::object::SymbolicFile.
Definition at line 48 of file IRObjectFile.h.
References llvm::object::Binary::isIR().
ErrorOr< std::unique_ptr< IRObjectFile > > llvm::object::IRObjectFile::createIRObjectFile | ( | MemoryBufferRef | Object, |
LLVMContext & | Context | ||
) | [static] |
Definition at line 268 of file IRObjectFile.cpp.
References llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::getLazyBitcodeModule(), and llvm::MemoryBuffer::getMemBuffer().
Referenced by llvm::object::SymbolicFile::createSymbolicFile().
const Module& llvm::object::IRObjectFile::getModule | ( | ) | const [inline] |
Definition at line 41 of file IRObjectFile.h.
Module& llvm::object::IRObjectFile::getModule | ( | ) | [inline] |
Definition at line 44 of file IRObjectFile.h.
uint32_t IRObjectFile::getSymbolFlags | ( | DataRefImpl | Symb | ) | const [override, virtual] |
Implements llvm::object::SymbolicFile.
Definition at line 216 of file IRObjectFile.cpp.
References getAsmSymIndex(), getGV(), llvm::Value::getName(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::hasPrivateLinkage(), llvm::GlobalValue::hasWeakLinkage(), isDeclaration(), llvm::object::BasicSymbolRef::SF_Common, llvm::object::BasicSymbolRef::SF_FormatSpecific, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_None, llvm::object::BasicSymbolRef::SF_Undefined, llvm::object::BasicSymbolRef::SF_Weak, and llvm::StringRef::startswith().
const GlobalValue * IRObjectFile::getSymbolGV | ( | DataRefImpl | Symb | ) | const |
Definition at line 247 of file IRObjectFile.cpp.
References getGV().
void IRObjectFile::moveSymbolNext | ( | DataRefImpl & | Symb | ) | const [override, virtual] |
Implements llvm::object::SymbolicFile.
Definition at line 153 of file IRObjectFile.cpp.
References getAsmSymIndex(), getGV(), llvm::object::DataRefImpl::p, and skipEmpty().
std::error_code IRObjectFile::printSymbolName | ( | raw_ostream & | OS, |
DataRefImpl | Symb | ||
) | const [override, virtual] |
Implements llvm::object::SymbolicFile.
Definition at line 188 of file IRObjectFile.cpp.
References getAsmSymIndex(), getGV(), llvm::Value::getName(), and llvm::object::success.
basic_symbol_iterator IRObjectFile::symbol_begin_impl | ( | ) | const [override, virtual] |
Implements llvm::object::SymbolicFile.
Definition at line 252 of file IRObjectFile.cpp.
References llvm::Module::begin(), llvm::object::DataRefImpl::p, llvm::MipsISD::Ret, and skipEmpty().
basic_symbol_iterator IRObjectFile::symbol_end_impl | ( | ) | const [override, virtual] |
Implements llvm::object::SymbolicFile.
Definition at line 259 of file IRObjectFile.cpp.
References llvm::object::DataRefImpl::p, and llvm::MipsISD::Ret.