LLVM 20.0.0git
|
#include "llvm/Object/IRObjectFile.h"
Public Types | |
using | module_iterator = pointee_iterator< std::vector< std::unique_ptr< Module > >::const_iterator, const Module > |
Public Types inherited from llvm::object::SymbolicFile | |
using | basic_symbol_iterator_range = iterator_range< basic_symbol_iterator > |
Static Public Member Functions | |
static bool | classof (const Binary *v) |
static Expected< MemoryBufferRef > | findBitcodeInObject (const ObjectFile &Obj) |
Finds and returns bitcode embedded in the given object file, or an error code if not found. | |
static Expected< MemoryBufferRef > | findBitcodeInMemBuffer (MemoryBufferRef Object) |
Finds and returns bitcode in the given memory buffer (which may be either a bitcode file or a native object file with embedded bitcode), or an error code if not found. | |
static Expected< std::unique_ptr< IRObjectFile > > | create (MemoryBufferRef Object, LLVMContext &Context) |
Static Public Member Functions inherited from llvm::object::SymbolicFile | |
static Expected< std::unique_ptr< SymbolicFile > > | createSymbolicFile (MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context, bool InitContent=true) |
static Expected< std::unique_ptr< SymbolicFile > > | createSymbolicFile (MemoryBufferRef Object) |
static bool | classof (const Binary *v) |
static bool | isSymbolicFile (file_magic Type, const LLVMContext *Context) |
Static Public Member Functions inherited from llvm::object::Binary | |
static Error | checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size) |
Additional Inherited Members | |
Protected Types inherited from llvm::object::Binary | |
enum | { ID_Archive , ID_MachOUniversalBinary , ID_COFFImportFile , ID_IR , ID_TapiUniversal , ID_TapiFile , ID_Minidump , ID_WinRes , ID_Offload , ID_StartObjects , ID_COFF , ID_XCOFF32 , ID_XCOFF64 , ID_ELF32L , ID_ELF32B , ID_ELF64L , ID_ELF64B , ID_MachO32L , ID_MachO32B , ID_MachO64L , ID_MachO64B , ID_GOFF , ID_Wasm , ID_EndObjects } |
Protected Member Functions inherited from llvm::object::Binary | |
Binary (unsigned int Type, MemoryBufferRef Source) | |
Static Protected Member Functions inherited from llvm::object::Binary | |
static unsigned int | getELFType (bool isLE, bool is64Bits) |
static unsigned int | getMachOType (bool isLE, bool is64Bits) |
Protected Attributes inherited from llvm::object::Binary | |
MemoryBufferRef | Data |
Definition at line 27 of file IRObjectFile.h.
using llvm::object::IRObjectFile::module_iterator = pointee_iterator<std::vector<std::unique_ptr<Module> >::const_iterator, const Module> |
Definition at line 49 of file IRObjectFile.h.
|
overridedefault |
Definition at line 45 of file IRObjectFile.h.
|
static |
Definition at line 110 of file IRObjectFile.cpp.
References findBitcodeInMemBuffer(), llvm::getBitcodeModuleList(), and llvm::Expected< T >::takeError().
Referenced by llvm::object::SymbolicFile::createSymbolicFile(), and llvm::object::MachOUniversalBinary::ObjectForArch::getAsIRObject().
|
static |
Finds and returns bitcode in the given memory buffer (which may be either a bitcode file or a native object file with embedded bitcode), or an error code if not found.
Definition at line 89 of file IRObjectFile.cpp.
References llvm::file_magic::bitcode, llvm::file_magic::coff_object, llvm::object::ObjectFile::createObjectFile(), llvm::file_magic::elf_relocatable, llvm::errorCodeToError(), findBitcodeInObject(), llvm::Expected< T >::get(), llvm::identify_magic(), llvm::object::invalid_file_type, llvm::file_magic::macho_object, llvm::Expected< T >::takeError(), and llvm::file_magic::wasm_object.
Referenced by create(), llvm::LTOModule::getProducerString(), llvm::LTOModule::isBitcodeFile(), llvm::LTOModule::isBitcodeForTarget(), parseBitcodeFileImpl(), and llvm::object::readIRSymtab().
|
static |
Finds and returns bitcode embedded in the given object file, or an error code if not found.
Definition at line 73 of file IRObjectFile.cpp.
References llvm::object::bitcode_section_not_found, llvm::errorCodeToError(), llvm::object::Binary::getFileName(), llvm::object::ObjectFile::sections(), and llvm::Expected< T >::takeError().
Referenced by llvm::object::SymbolicFile::createSymbolicFile(), and findBitcodeInMemBuffer().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 49 of file IRObjectFile.cpp.
References getSym(), and llvm::ModuleSymbolTable::getSymbolFlags().
StringRef IRObjectFile::getTargetTriple | ( | ) | const |
Definition at line 66 of file IRObjectFile.cpp.
Referenced by llvm::object::Slice::create(), and is64Bit().
|
inlineoverridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 40 of file IRObjectFile.h.
References getTargetTriple(), and llvm::Triple::isArch64Bit().
|
inline |
Definition at line 53 of file IRObjectFile.h.
Referenced by modules().
|
inline |
Definition at line 54 of file IRObjectFile.h.
Referenced by modules().
|
inline |
Definition at line 56 of file IRObjectFile.h.
References llvm::make_range(), module_begin(), and module_end().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 40 of file IRObjectFile.cpp.
References llvm::object::DataRefImpl::p.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 44 of file IRObjectFile.cpp.
References getSym(), OS, llvm::ModuleSymbolTable::printSymbolName(), and llvm::Error::success().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 53 of file IRObjectFile.cpp.
References llvm::ModuleSymbolTable::symbols().
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 59 of file IRObjectFile.cpp.
References llvm::ModuleSymbolTable::symbols().