LLVM 22.0.0git
|
Typedefs | |
typedef struct LLVMOpaqueSectionIterator * | LLVMSectionIteratorRef |
typedef struct LLVMOpaqueSymbolIterator * | LLVMSymbolIteratorRef |
typedef struct LLVMOpaqueRelocationIterator * | LLVMRelocationIteratorRef |
typedef struct LLVMOpaqueObjectFile * | LLVMObjectFileRef |
Deprecated: Use LLVMBinaryRef instead. | |
typedef struct LLVMOpaqueObjectFile* LLVMObjectFileRef |
typedef struct LLVMOpaqueRelocationIterator* LLVMRelocationIteratorRef |
typedef struct LLVMOpaqueSectionIterator* LLVMSectionIteratorRef |
typedef struct LLVMOpaqueSymbolIterator* LLVMSymbolIteratorRef |
enum LLVMBinaryType |
LLVM_C_ABI LLVMMemoryBufferRef LLVMBinaryCopyMemoryBuffer | ( | LLVMBinaryRef | BR | ) |
Retrieves a copy of the memory buffer associated with this object file.
The returned buffer is merely a shallow copy and does not own the actual backing buffer of the binary. Nevertheless, it is the responsibility of the caller to free it with LLVMDisposeMemoryBuffer
.
Definition at line 79 of file Object.cpp.
References llvm::MemoryBuffer::getMemBuffer(), unwrap(), and wrap().
LLVM_C_ABI LLVMBinaryType LLVMBinaryGetType | ( | LLVMBinaryRef | BR | ) |
Retrieve the specific type of a binary.
Definition at line 90 of file Object.cpp.
References getType(), llvm::object::Binary::ID_Archive, llvm::object::Binary::ID_COFF, llvm::object::Binary::ID_COFFImportFile, llvm::object::Binary::ID_DXContainer, llvm::object::Binary::ID_ELF32B, llvm::object::Binary::ID_ELF32L, llvm::object::Binary::ID_ELF64B, llvm::object::Binary::ID_ELF64L, llvm::object::Binary::ID_EndObjects, llvm::object::Binary::ID_IR, llvm::object::Binary::ID_MachO32B, llvm::object::Binary::ID_MachO32L, llvm::object::Binary::ID_MachO64B, llvm::object::Binary::ID_MachO64L, llvm::object::Binary::ID_MachOUniversalBinary, llvm::object::Binary::ID_Offload, llvm::object::Binary::ID_StartObjects, llvm::object::Binary::ID_Wasm, llvm::object::Binary::ID_WinRes, llvm_unreachable, LLVMBinaryTypeArchive, LLVMBinaryTypeCOFF, LLVMBinaryTypeCOFFImportFile, LLVMBinaryTypeDXcontainer, LLVMBinaryTypeELF32B, LLVMBinaryTypeELF32L, LLVMBinaryTypeELF64B, LLVMBinaryTypeELF64L, LLVMBinaryTypeIR, LLVMBinaryTypeMachO32B, LLVMBinaryTypeMachO32L, LLVMBinaryTypeMachO64B, LLVMBinaryTypeMachO64L, LLVMBinaryTypeMachOUniversalBinary, LLVMBinaryTypeOffload, LLVMBinaryTypeWasm, LLVMBinaryTypeWinRes, and unwrap().
LLVM_C_ABI LLVMBinaryRef LLVMCreateBinary | ( | LLVMMemoryBufferRef | MemBuf, |
LLVMContextRef | Context, | ||
char ** | ErrorMessage | ||
) |
Create a binary file from the given memory buffer.
The exact type of the binary file will be inferred automatically, and the appropriate implementation selected. The context may be NULL except if the resulting file is an LLVM IR file.
The memory buffer is not consumed by this function. It is the responsibilty of the caller to free it with LLVMDisposeMemoryBuffer
.
If NULL is returned, the ErrorMessage
parameter is populated with the error's description. It is then the caller's responsibility to free this message by calling LLVMDisposeMessage
.
Definition at line 65 of file Object.cpp.
References Context, llvm::object::createBinary(), llvm::Expected< T >::get(), llvm::Expected< T >::takeError(), llvm::toString(), unwrap(), and wrap().
LLVM_C_ABI LLVMObjectFileRef LLVMCreateObjectFile | ( | LLVMMemoryBufferRef | MemBuf | ) |
Deprecated: Use LLVMCreateBinary instead.
Definition at line 183 of file Object.cpp.
References llvm::consumeError(), llvm::object::ObjectFile::createObjectFile(), llvm::Expected< T >::get(), llvm::Expected< T >::takeError(), unwrap(), and wrap().
LLVM_C_ABI void LLVMDisposeBinary | ( | LLVMBinaryRef | BR | ) |
Dispose of a binary file.
The binary file does not own its backing buffer. It is the responsibilty of the caller to free it with LLVMDisposeMemoryBuffer
.
Definition at line 86 of file Object.cpp.
References unwrap().
LLVM_C_ABI void LLVMDisposeObjectFile | ( | LLVMObjectFileRef | ObjectFile | ) |
Deprecated: Use LLVMDisposeBinary instead.
Definition at line 197 of file Object.cpp.
References unwrap().
LLVM_C_ABI void LLVMDisposeRelocationIterator | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 289 of file Object.cpp.
References unwrap().
LLVM_C_ABI void LLVMDisposeSectionIterator | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 208 of file Object.cpp.
References unwrap().
LLVM_C_ABI void LLVMDisposeSymbolIterator | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 241 of file Object.cpp.
References unwrap().
LLVM_C_ABI uint64_t LLVMGetRelocationOffset | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 331 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMRelocationIteratorRef LLVMGetRelocations | ( | LLVMSectionIteratorRef | Section | ) |
Definition at line 284 of file Object.cpp.
LLVM_C_ABI LLVMSymbolIteratorRef LLVMGetRelocationSymbol | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 335 of file Object.cpp.
LLVM_C_ABI uint64_t LLVMGetRelocationType | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 340 of file Object.cpp.
References unwrap().
LLVM_C_ABI const char * LLVMGetRelocationTypeName | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 345 of file Object.cpp.
References llvm::copy(), llvm::getTypeName(), llvm::safe_malloc(), llvm::SmallVectorBase< Size_T >::size(), and unwrap().
LLVM_C_ABI const char * LLVMGetRelocationValueString | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 354 of file Object.cpp.
LLVM_C_ABI uint64_t LLVMGetSectionAddress | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 274 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMBool LLVMGetSectionContainsSymbol | ( | LLVMSectionIteratorRef | SI, |
LLVMSymbolIteratorRef | Sym | ||
) |
Definition at line 278 of file Object.cpp.
LLVM_C_ABI const char * LLVMGetSectionContents | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 267 of file Object.cpp.
References llvm::report_fatal_error(), and unwrap().
LLVM_C_ABI const char * LLVMGetSectionName | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 256 of file Object.cpp.
References getName(), llvm::report_fatal_error(), and unwrap().
LLVM_C_ABI LLVMSectionIteratorRef LLVMGetSections | ( | LLVMObjectFileRef | ObjectFile | ) |
Deprecated: Use LLVMObjectFileCopySectionIterator instead.
Definition at line 202 of file Object.cpp.
LLVM_C_ABI uint64_t LLVMGetSectionSize | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 263 of file Object.cpp.
References unwrap().
LLVM_C_ABI uint64_t LLVMGetSymbolAddress | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 315 of file Object.cpp.
References llvm::logAllUnhandledErrors(), OS, llvm::report_fatal_error(), and unwrap().
LLVM_C_ABI const char * LLVMGetSymbolName | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 304 of file Object.cpp.
References getName(), llvm::logAllUnhandledErrors(), OS, llvm::report_fatal_error(), and unwrap().
LLVM_C_ABI LLVMSymbolIteratorRef LLVMGetSymbols | ( | LLVMObjectFileRef | ObjectFile | ) |
Deprecated: Use LLVMObjectFileCopySymbolIterator instead.
Definition at line 235 of file Object.cpp.
LLVM_C_ABI uint64_t LLVMGetSymbolSize | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 326 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMBool LLVMIsRelocationIteratorAtEnd | ( | LLVMSectionIteratorRef | Section, |
LLVMRelocationIteratorRef | RI | ||
) |
Definition at line 293 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMBool LLVMIsSectionIteratorAtEnd | ( | LLVMObjectFileRef | ObjectFile, |
LLVMSectionIteratorRef | SI | ||
) |
Deprecated: Use LLVMObjectFileIsSectionIteratorAtEnd instead.
Definition at line 212 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMBool LLVMIsSymbolIteratorAtEnd | ( | LLVMObjectFileRef | ObjectFile, |
LLVMSymbolIteratorRef | SI | ||
) |
Deprecated: Use LLVMObjectFileIsSymbolIteratorAtEnd instead.
Definition at line 245 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMBinaryRef LLVMMachOUniversalBinaryCopyObjectForArch | ( | LLVMBinaryRef | BR, |
const char * | Arch, | ||
size_t | ArchLen, | ||
char ** | ErrorMessage | ||
) |
Definition at line 140 of file Object.cpp.
References llvm::Expected< T >::get(), llvm::Expected< T >::takeError(), llvm::toString(), unwrap(), and wrap().
LLVM_C_ABI void LLVMMoveToContainingSection | ( | LLVMSectionIteratorRef | Sect, |
LLVMSymbolIteratorRef | Sym | ||
) |
Definition at line 222 of file Object.cpp.
References llvm::object::getSection(), llvm::logAllUnhandledErrors(), OS, llvm::report_fatal_error(), Sym, llvm::Expected< T >::takeError(), and unwrap().
LLVM_C_ABI void LLVMMoveToNextRelocation | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 298 of file Object.cpp.
References unwrap().
LLVM_C_ABI void LLVMMoveToNextSection | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 218 of file Object.cpp.
References unwrap().
LLVM_C_ABI void LLVMMoveToNextSymbol | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 251 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMSectionIteratorRef LLVMObjectFileCopySectionIterator | ( | LLVMBinaryRef | BR | ) |
Retrieve a copy of the section iterator for this object file.
If there are no sections, the result is NULL.
The returned iterator is merely a shallow copy. Nevertheless, it is the responsibility of the caller to free it with LLVMDisposeSectionIterator
.
Definition at line 154 of file Object.cpp.
LLVM_C_ABI LLVMSymbolIteratorRef LLVMObjectFileCopySymbolIterator | ( | LLVMBinaryRef | BR | ) |
Retrieve a copy of the symbol iterator for this object file.
If there are no symbols, the result is NULL.
The returned iterator is merely a shallow copy. Nevertheless, it is the responsibility of the caller to free it with LLVMDisposeSymbolIterator
.
Definition at line 168 of file Object.cpp.
LLVM_C_ABI LLVMBool LLVMObjectFileIsSectionIteratorAtEnd | ( | LLVMBinaryRef | BR, |
LLVMSectionIteratorRef | SI | ||
) |
Returns whether the given section iterator is at the end.
Definition at line 162 of file Object.cpp.
References unwrap().
LLVM_C_ABI LLVMBool LLVMObjectFileIsSymbolIteratorAtEnd | ( | LLVMBinaryRef | BR, |
LLVMSymbolIteratorRef | SI | ||
) |
Returns whether the given symbol iterator is at the end.
Definition at line 176 of file Object.cpp.
References unwrap().