LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::object::IRObjectFile Class Reference

#include "llvm/Object/IRObjectFile.h"

Inheritance diagram for llvm::object::IRObjectFile:
Inheritance graph
[legend]

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 >
 

Public Member Functions

 ~IRObjectFile () override
 
void moveSymbolNext (DataRefImpl &Symb) const override
 
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const override
 
basic_symbol_iterator symbol_begin () const override
 
basic_symbol_iterator symbol_end () const override
 
bool is64Bit () const override
 
StringRef getTargetTriple () const
 
module_iterator module_begin () const
 
module_iterator module_end () const
 
iterator_range< module_iteratormodules () const
 
- Public Member Functions inherited from llvm::object::SymbolicFile
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 
 ~SymbolicFile () override
 
virtual void moveSymbolNext (DataRefImpl &Symb) const =0
 
virtual Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const =0
 
virtual Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const =0
 
virtual basic_symbol_iterator symbol_begin () const =0
 
virtual basic_symbol_iterator symbol_end () const =0
 
virtual bool is64Bit () const =0
 
basic_symbol_iterator_range symbols () const
 
- Public Member Functions inherited from llvm::object::Binary
 Binary ()=delete
 
 Binary (const Binary &other)=delete
 
virtual ~Binary ()
 
virtual Error initContent ()
 
StringRef getData () const
 
StringRef getFileName () const
 
MemoryBufferRef getMemoryBufferRef () const
 
unsigned int getType () const
 
bool isObject () const
 
bool isSymbolic () const
 
bool isArchive () const
 
bool isMachOUniversalBinary () const
 
bool isTapiUniversal () const
 
bool isELF () const
 
bool isMachO () const
 
bool isCOFF () const
 
bool isXCOFF () const
 
bool isWasm () const
 
bool isOffloadFile () const
 
bool isCOFFImportFile () const
 
bool isIR () const
 
bool isGOFF () const
 
bool isMinidump () const
 
bool isTapiFile () const
 
bool isLittleEndian () const
 
bool isWinRes () const
 
Triple::ObjectFormatType getTripleObjectFormat () const
 

Static Public Member Functions

static bool classof (const Binary *v)
 
static Expected< MemoryBufferReffindBitcodeInObject (const ObjectFile &Obj)
 Finds and returns bitcode embedded in the given object file, or an error code if not found.
 
static Expected< MemoryBufferReffindBitcodeInMemBuffer (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
 

Detailed Description

Definition at line 27 of file IRObjectFile.h.

Member Typedef Documentation

◆ module_iterator

Definition at line 49 of file IRObjectFile.h.

Constructor & Destructor Documentation

◆ ~IRObjectFile()

IRObjectFile::~IRObjectFile ( )
overridedefault

Member Function Documentation

◆ classof()

static bool llvm::object::IRObjectFile::classof ( const Binary v)
inlinestatic

Definition at line 45 of file IRObjectFile.h.

◆ create()

Expected< std::unique_ptr< IRObjectFile > > IRObjectFile::create ( MemoryBufferRef  Object,
LLVMContext Context 
)
static

◆ findBitcodeInMemBuffer()

Expected< MemoryBufferRef > IRObjectFile::findBitcodeInMemBuffer ( MemoryBufferRef  Object)
static

◆ findBitcodeInObject()

Expected< MemoryBufferRef > IRObjectFile::findBitcodeInObject ( const ObjectFile Obj)
static

◆ getSymbolFlags()

Expected< uint32_t > IRObjectFile::getSymbolFlags ( DataRefImpl  Symb) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 49 of file IRObjectFile.cpp.

References getSym(), and llvm::ModuleSymbolTable::getSymbolFlags().

◆ getTargetTriple()

StringRef IRObjectFile::getTargetTriple ( ) const

Definition at line 66 of file IRObjectFile.cpp.

Referenced by llvm::object::Slice::create(), and is64Bit().

◆ is64Bit()

bool llvm::object::IRObjectFile::is64Bit ( ) const
inlineoverridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 40 of file IRObjectFile.h.

References getTargetTriple(), and llvm::Triple::isArch64Bit().

◆ module_begin()

module_iterator llvm::object::IRObjectFile::module_begin ( ) const
inline

Definition at line 53 of file IRObjectFile.h.

Referenced by modules().

◆ module_end()

module_iterator llvm::object::IRObjectFile::module_end ( ) const
inline

Definition at line 54 of file IRObjectFile.h.

Referenced by modules().

◆ modules()

iterator_range< module_iterator > llvm::object::IRObjectFile::modules ( ) const
inline

Definition at line 56 of file IRObjectFile.h.

References llvm::make_range(), module_begin(), and module_end().

◆ moveSymbolNext()

void IRObjectFile::moveSymbolNext ( DataRefImpl Symb) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 40 of file IRObjectFile.cpp.

References llvm::object::DataRefImpl::p.

◆ printSymbolName()

Error IRObjectFile::printSymbolName ( raw_ostream OS,
DataRefImpl  Symb 
) const
overridevirtual

◆ symbol_begin()

basic_symbol_iterator IRObjectFile::symbol_begin ( ) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 53 of file IRObjectFile.cpp.

References llvm::ModuleSymbolTable::symbols().

◆ symbol_end()

basic_symbol_iterator IRObjectFile::symbol_end ( ) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 59 of file IRObjectFile.cpp.

References llvm::ModuleSymbolTable::symbols().


The documentation for this class was generated from the following files: