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

#include <IRObjectFile.h>

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

Public Member Functions

 IRObjectFile (MemoryBufferRef Object, std::unique_ptr< Module > M)
 
 ~IRObjectFile () override
 
void moveSymbolNext (DataRefImpl &Symb) const override
 
std::error_code printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
uint32_t getSymbolFlags (DataRefImpl Symb) const override
 
GlobalValuegetSymbolGV (DataRefImpl Symb)
 
const GlobalValuegetSymbolGV (DataRefImpl Symb) const
 
basic_symbol_iterator symbol_begin_impl () const override
 
basic_symbol_iterator symbol_end_impl () const override
 
const ModulegetModule () const
 
ModulegetModule ()
 
std::unique_ptr< ModuletakeModule ()
 
- Public Member Functions inherited from llvm::object::SymbolicFile
 ~SymbolicFile () override
 
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 
basic_symbol_iterator symbol_begin () const
 
basic_symbol_iterator symbol_end () const
 
basic_symbol_iterator_range symbols () const
 
- Public Member Functions inherited from llvm::object::Binary
virtual ~Binary ()
 
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 isELF () const
 
bool isMachO () const
 
bool isCOFF () const
 
bool isIR () const
 
bool isLittleEndian () const
 

Static Public Member Functions

static bool classof (const Binary *v)
 
static ErrorOr< MemoryBufferReffindBitcodeInObject (const ObjectFile &Obj)
 Finds and returns bitcode embedded in the given object file, or an error code if not found. More...
 
static ErrorOr< 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. More...
 
static ErrorOr
< std::unique_ptr
< IRObjectFile > > 
create (MemoryBufferRef Object, LLVMContext &Context)
 
- Static Public Member Functions inherited from llvm::object::SymbolicFile
static ErrorOr
< std::unique_ptr
< SymbolicFile > > 
createSymbolicFile (MemoryBufferRef Object, sys::fs::file_magic Type, LLVMContext *Context)
 
static ErrorOr
< std::unique_ptr
< SymbolicFile > > 
createSymbolicFile (MemoryBufferRef Object)
 
static ErrorOr< OwningBinary
< SymbolicFile > > 
createSymbolicFile (StringRef ObjectPath)
 
static bool classof (const Binary *v)
 

Additional Inherited Members

- Public Types inherited from llvm::object::SymbolicFile
typedef iterator_range
< basic_symbol_iterator
basic_symbol_iterator_range
 
- Protected Types inherited from llvm::object::Binary
enum  {
  ID_Archive, ID_MachOUniversalBinary, ID_IR, ID_StartObjects,
  ID_COFF, ID_ELF32L, ID_ELF32B, ID_ELF64L,
  ID_ELF64B, ID_MachO32L, ID_MachO32B, ID_MachO64L,
  ID_MachO64B, 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.

Constructor & Destructor Documentation

IRObjectFile::IRObjectFile ( MemoryBufferRef  Object,
std::unique_ptr< Module M 
)
IRObjectFile::~IRObjectFile ( )
override

Definition at line 114 of file IRObjectFile.cpp.

Member Function Documentation

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

Definition at line 54 of file IRObjectFile.h.

References llvm::object::Binary::isIR().

ErrorOr< std::unique_ptr< IRObjectFile > > llvm::object::IRObjectFile::create ( MemoryBufferRef  Object,
LLVMContext Context 
)
static
ErrorOr< MemoryBufferRef > IRObjectFile::findBitcodeInMemBuffer ( MemoryBufferRef  Object)
static
ErrorOr< MemoryBufferRef > IRObjectFile::findBitcodeInObject ( const ObjectFile Obj)
static

Finds and returns bitcode embedded in the given object file, or an error code if not found.

Definition at line 260 of file IRObjectFile.cpp.

References llvm::object::bitcode_section_not_found, llvm::object::Binary::getFileName(), and llvm::object::ObjectFile::sections().

Referenced by llvm::object::SymbolicFile::createSymbolicFile(), and findBitcodeInMemBuffer().

const Module& llvm::object::IRObjectFile::getModule ( ) const
inline

Definition at line 46 of file IRObjectFile.h.

Module& llvm::object::IRObjectFile::getModule ( )
inline

Definition at line 49 of file IRObjectFile.h.

uint32_t IRObjectFile::getSymbolFlags ( DataRefImpl  Symb) const
overridevirtual
GlobalValue * IRObjectFile::getSymbolGV ( DataRefImpl  Symb)

Definition at line 241 of file IRObjectFile.cpp.

References getGV().

Referenced by getSymbolGV().

const GlobalValue* llvm::object::IRObjectFile::getSymbolGV ( DataRefImpl  Symb) const
inline

Definition at line 40 of file IRObjectFile.h.

References getSymbolGV().

void IRObjectFile::moveSymbolNext ( DataRefImpl Symb) const
overridevirtual
std::error_code IRObjectFile::printSymbolName ( raw_ostream OS,
DataRefImpl  Symb 
) const
overridevirtual
basic_symbol_iterator IRObjectFile::symbol_begin_impl ( ) const
overridevirtual
basic_symbol_iterator IRObjectFile::symbol_end_impl ( ) const
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 252 of file IRObjectFile.cpp.

References llvm::object::DataRefImpl::p, and llvm::MipsISD::Ret.

std::unique_ptr< Module > IRObjectFile::takeModule ( )

Definition at line 243 of file IRObjectFile.cpp.


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