LLVM 22.0.0git
llvm::object::DXContainerObjectFile Class Reference

#include "llvm/Object/DXContainer.h"

Inheritance diagram for llvm::object::DXContainerObjectFile:
[legend]

Public Member Functions

const DXContainergetDXContainer () const
const dxbc::HeadergetHeader () const
Expected< StringRefgetSymbolName (DataRefImpl) const override
Expected< uint64_tgetSymbolAddress (DataRefImpl Symb) const override
uint64_t getSymbolValueImpl (DataRefImpl Symb) const override
uint64_t getCommonSymbolSizeImpl (DataRefImpl Symb) const override
Expected< SymbolRef::TypegetSymbolType (DataRefImpl Symb) const override
Expected< section_iteratorgetSymbolSection (DataRefImpl Symb) const override
void moveSectionNext (DataRefImpl &Sec) const override
Expected< StringRefgetSectionName (DataRefImpl Sec) const override
uint64_t getSectionAddress (DataRefImpl Sec) const override
uint64_t getSectionIndex (DataRefImpl Sec) const override
uint64_t getSectionSize (DataRefImpl Sec) const override
Expected< ArrayRef< uint8_t > > getSectionContents (DataRefImpl Sec) const override
uint64_t getSectionAlignment (DataRefImpl Sec) const override
bool isSectionCompressed (DataRefImpl Sec) const override
bool isSectionText (DataRefImpl Sec) const override
bool isSectionData (DataRefImpl Sec) const override
bool isSectionBSS (DataRefImpl Sec) const override
bool isSectionVirtual (DataRefImpl Sec) const override
relocation_iterator section_rel_begin (DataRefImpl Sec) const override
relocation_iterator section_rel_end (DataRefImpl Sec) const override
void moveRelocationNext (DataRefImpl &Rel) const override
uint64_t getRelocationOffset (DataRefImpl Rel) const override
symbol_iterator getRelocationSymbol (DataRefImpl Rel) const override
uint64_t getRelocationType (DataRefImpl Rel) const override
void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const override
section_iterator section_begin () const override
section_iterator section_end () const override
uint8_t getBytesInAddress () const override
 The number of bytes used to represent an address in this object file format.
StringRef getFileFormatName () const override
Triple::ArchType getArch () const override
Expected< SubtargetFeaturesgetFeatures () const 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
bool isRelocatableObject () const override
 True if this is a relocatable object (.o/.obj).
Public Member Functions inherited from llvm::object::ObjectFile
 ObjectFile ()=delete
 ObjectFile (const ObjectFile &other)=delete
ObjectFileoperator= (const ObjectFile &other)=delete
uint64_t getCommonSymbolSize (DataRefImpl Symb) const
virtual std::vector< SectionRefdynamic_relocation_sections () const
symbol_iterator_range symbols () const
section_iterator_range sections () const
virtual bool hasDebugInfo () const
virtual Triple::OSType getOS () const
virtual std::optional< StringReftryGetCPUName () const
virtual void setARMSubArch (Triple &TheTriple) const
virtual Expected< uint64_tgetStartAddress () const
Triple makeTriple () const
 Create a triple from the data in this object file.
virtual StringRef mapDebugSectionName (StringRef Name) const
 Maps a debug section name to a standard DWARF section name.
bool isReflectionSectionStrippable (llvm::binaryformat::Swift5ReflectionSectionKind ReflectionSectionKind) const
 True if the reflection section can be stripped by the linker.
Public Member Functions inherited from llvm::object::SymbolicFile
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 ~SymbolicFile () override
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
bool isDXContainer () const
Triple::ObjectFormatType getTripleObjectFormat () const

Static Public Member Functions

static bool classof (const Binary *v)
Static Public Member Functions inherited from llvm::object::ObjectFile
static Expected< OwningBinary< ObjectFile > > createObjectFile (StringRef ObjectPath)
static Expected< std::unique_ptr< ObjectFile > > createObjectFile (MemoryBufferRef Object, llvm::file_magic Type, bool InitContent=true)
static Expected< std::unique_ptr< ObjectFile > > createObjectFile (MemoryBufferRef Object)
static bool classof (const Binary *v)
static Expected< std::unique_ptr< COFFObjectFile > > createCOFFObjectFile (MemoryBufferRef Object)
static Expected< std::unique_ptr< ObjectFile > > createXCOFFObjectFile (MemoryBufferRef Object, unsigned FileType)
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile (MemoryBufferRef Object, bool InitContent=true)
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0, size_t MachOFilesetEntryOffset=0)
 Create a MachOObjectFile instance from a given buffer.
static Expected< std::unique_ptr< ObjectFile > > createGOFFObjectFile (MemoryBufferRef Object)
static Expected< std::unique_ptr< WasmObjectFile > > createWasmObjectFile (MemoryBufferRef Object)
static Expected< std::unique_ptr< DXContainerObjectFile > > createDXContainerObjectFile (MemoryBufferRef Object)
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)

Friends

class ObjectFile

Additional Inherited Members

Public Types inherited from llvm::object::ObjectFile
using symbol_iterator_range = iterator_range<symbol_iterator>
using section_iterator_range = iterator_range<section_iterator>
Public Types inherited from llvm::object::SymbolicFile
using basic_symbol_iterator_range = iterator_range<basic_symbol_iterator>
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_DXContainer ,
  ID_EndObjects
}
Protected Member Functions inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
const uint8_tbase () const
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
virtual uint32_t getSymbolAlignment (DataRefImpl Symb) const
virtual bool isSectionBitcode (DataRefImpl Sec) const
virtual bool isSectionStripped (DataRefImpl Sec) const
virtual bool isBerkeleyText (DataRefImpl Sec) const
virtual bool isBerkeleyData (DataRefImpl Sec) const
virtual bool isDebugSection (DataRefImpl Sec) const
virtual Expected< section_iteratorgetRelocatedSection (DataRefImpl Sec) const
virtual llvm::binaryformat::Swift5ReflectionSectionKind mapReflectionSectionNameToEnumValue (StringRef SectionName) const
Expected< uint64_tgetSymbolValue (DataRefImpl Symb) const
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 589 of file DXContainer.h.

Member Function Documentation

◆ classof()

bool llvm::object::DXContainerObjectFile::classof ( const Binary * v)
inlinestatic

Definition at line 608 of file DXContainer.h.

◆ getArch()

Triple::ArchType DXContainerObjectFile::getArch ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 675 of file DXContainer.cpp.

References llvm::Triple::dxil.

◆ getBytesInAddress()

uint8_t DXContainerObjectFile::getBytesInAddress ( ) const
overridevirtual

The number of bytes used to represent an address in this object file format.

Implements llvm::object::ObjectFile.

Definition at line 669 of file DXContainer.cpp.

◆ getCommonSymbolSizeImpl()

uint64_t DXContainerObjectFile::getCommonSymbolSizeImpl ( DataRefImpl Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 558 of file DXContainer.cpp.

References llvm_unreachable.

◆ getDXContainer()

const DXContainer & llvm::object::DXContainerObjectFile::getDXContainer ( ) const
inline

Definition at line 606 of file DXContainer.h.

◆ getFeatures()

Expected< SubtargetFeatures > DXContainerObjectFile::getFeatures ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 677 of file DXContainer.cpp.

◆ getFileFormatName()

StringRef DXContainerObjectFile::getFileFormatName ( ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 671 of file DXContainer.cpp.

◆ getHeader()

const dxbc::Header & llvm::object::DXContainerObjectFile::getHeader ( ) const
inline

Definition at line 610 of file DXContainer.h.

◆ getRelocationOffset()

uint64_t DXContainerObjectFile::getRelocationOffset ( DataRefImpl Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 640 of file DXContainer.cpp.

References llvm_unreachable.

◆ getRelocationSymbol()

symbol_iterator DXContainerObjectFile::getRelocationSymbol ( DataRefImpl Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 645 of file DXContainer.cpp.

References llvm::object::ObjectFile::SymbolRef.

◆ getRelocationType()

uint64_t DXContainerObjectFile::getRelocationType ( DataRefImpl Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 649 of file DXContainer.cpp.

References llvm_unreachable.

◆ getRelocationTypeName()

void DXContainerObjectFile::getRelocationTypeName ( DataRefImpl Rel,
SmallVectorImpl< char > & Result ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 653 of file DXContainer.cpp.

References llvm_unreachable.

◆ getSectionAddress()

uint64_t DXContainerObjectFile::getSectionAddress ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 582 of file DXContainer.cpp.

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

◆ getSectionAlignment()

uint64_t DXContainerObjectFile::getSectionAlignment ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 602 of file DXContainer.cpp.

◆ getSectionContents()

Expected< ArrayRef< uint8_t > > DXContainerObjectFile::getSectionContents ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 597 of file DXContainer.cpp.

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

◆ getSectionIndex()

uint64_t DXContainerObjectFile::getSectionIndex ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 587 of file DXContainer.cpp.

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

◆ getSectionName()

Expected< StringRef > DXContainerObjectFile::getSectionName ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 577 of file DXContainer.cpp.

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

◆ getSectionSize()

uint64_t DXContainerObjectFile::getSectionSize ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 592 of file DXContainer.cpp.

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

◆ getSymbolAddress()

Expected< uint64_t > DXContainerObjectFile::getSymbolAddress ( DataRefImpl Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 550 of file DXContainer.cpp.

References llvm::make_error().

◆ getSymbolFlags()

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

Implements llvm::object::SymbolicFile.

Definition at line 687 of file DXContainer.cpp.

References llvm::make_error().

◆ getSymbolName()

Expected< StringRef > DXContainerObjectFile::getSymbolName ( DataRefImpl ) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 545 of file DXContainer.cpp.

References llvm::make_error().

◆ getSymbolSection()

Expected< section_iterator > DXContainerObjectFile::getSymbolSection ( DataRefImpl Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 541 of file DXContainer.cpp.

References llvm::make_error().

◆ getSymbolType()

Expected< SymbolRef::Type > DXContainerObjectFile::getSymbolType ( DataRefImpl Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 563 of file DXContainer.cpp.

References llvm::make_error().

◆ getSymbolValueImpl()

uint64_t DXContainerObjectFile::getSymbolValueImpl ( DataRefImpl Symb) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 554 of file DXContainer.cpp.

References llvm_unreachable.

◆ is64Bit()

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

Implements llvm::object::SymbolicFile.

Definition at line 661 of file DXContainer.h.

◆ isRelocatableObject()

bool llvm::object::DXContainerObjectFile::isRelocatableObject ( ) const
inlineoverridevirtual

True if this is a relocatable object (.o/.obj).

Implements llvm::object::ObjectFile.

Definition at line 663 of file DXContainer.h.

◆ isSectionBSS()

bool DXContainerObjectFile::isSectionBSS ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 618 of file DXContainer.cpp.

◆ isSectionCompressed()

bool DXContainerObjectFile::isSectionCompressed ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 606 of file DXContainer.cpp.

◆ isSectionData()

bool DXContainerObjectFile::isSectionData ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 614 of file DXContainer.cpp.

◆ isSectionText()

bool DXContainerObjectFile::isSectionText ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 610 of file DXContainer.cpp.

◆ isSectionVirtual()

bool DXContainerObjectFile::isSectionVirtual ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 622 of file DXContainer.cpp.

◆ moveRelocationNext()

void DXContainerObjectFile::moveRelocationNext ( DataRefImpl & Rel) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 636 of file DXContainer.cpp.

References llvm_unreachable.

◆ moveSectionNext()

void DXContainerObjectFile::moveSectionNext ( DataRefImpl & Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 567 of file DXContainer.cpp.

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

◆ moveSymbolNext()

void llvm::object::DXContainerObjectFile::moveSymbolNext ( DataRefImpl & Symb) const
inlineoverridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 652 of file DXContainer.h.

◆ printSymbolName()

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

Implements llvm::object::SymbolicFile.

Definition at line 681 of file DXContainer.cpp.

References llvm::make_error().

◆ section_begin()

section_iterator DXContainerObjectFile::section_begin ( ) const
overridevirtual

◆ section_end()

section_iterator DXContainerObjectFile::section_end ( ) const
overridevirtual

◆ section_rel_begin()

relocation_iterator DXContainerObjectFile::section_rel_begin ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 627 of file DXContainer.cpp.

References llvm::object::ObjectFile::RelocationRef.

◆ section_rel_end()

relocation_iterator DXContainerObjectFile::section_rel_end ( DataRefImpl Sec) const
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 632 of file DXContainer.cpp.

References llvm::object::ObjectFile::RelocationRef.

◆ symbol_begin()

basic_symbol_iterator llvm::object::DXContainerObjectFile::symbol_begin ( ) const
inlineoverridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 655 of file DXContainer.h.

References llvm::object::ObjectFile::SymbolRef.

◆ symbol_end()

basic_symbol_iterator llvm::object::DXContainerObjectFile::symbol_end ( ) const
inlineoverridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 658 of file DXContainer.h.

References llvm::object::ObjectFile::SymbolRef.

◆ ObjectFile

friend class ObjectFile
friend

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