LLVM 20.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 |
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().
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_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, LLVMBinaryTypeELF32B, LLVMBinaryTypeELF32L, LLVMBinaryTypeELF64B, LLVMBinaryTypeELF64L, LLVMBinaryTypeIR, LLVMBinaryTypeMachO32B, LLVMBinaryTypeMachO32L, LLVMBinaryTypeMachO64B, LLVMBinaryTypeMachO64L, LLVMBinaryTypeMachOUniversalBinary, LLVMBinaryTypeOffload, LLVMBinaryTypeWasm, LLVMBinaryTypeWinRes, and unwrap().
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 llvm::object::createBinary(), llvm::Expected< T >::get(), llvm::Expected< T >::takeError(), llvm::toString(), unwrap(), and wrap().
LLVMObjectFileRef LLVMCreateObjectFile | ( | LLVMMemoryBufferRef | MemBuf | ) |
Deprecated: Use LLVMCreateBinary instead.
Definition at line 181 of file Object.cpp.
References llvm::consumeError(), llvm::object::ObjectFile::createObjectFile(), llvm::Expected< T >::get(), llvm::Expected< T >::takeError(), unwrap(), and wrap().
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().
void LLVMDisposeObjectFile | ( | LLVMObjectFileRef | ObjectFile | ) |
Deprecated: Use LLVMDisposeBinary instead.
Definition at line 196 of file Object.cpp.
References unwrap().
void LLVMDisposeRelocationIterator | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 288 of file Object.cpp.
References unwrap().
void LLVMDisposeSectionIterator | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 207 of file Object.cpp.
References unwrap().
void LLVMDisposeSymbolIterator | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 240 of file Object.cpp.
References unwrap().
uint64_t LLVMGetRelocationOffset | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 330 of file Object.cpp.
References unwrap().
LLVMRelocationIteratorRef LLVMGetRelocations | ( | LLVMSectionIteratorRef | Section | ) |
Definition at line 283 of file Object.cpp.
LLVMSymbolIteratorRef LLVMGetRelocationSymbol | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 334 of file Object.cpp.
uint64_t LLVMGetRelocationType | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 339 of file Object.cpp.
References unwrap().
const char * LLVMGetRelocationTypeName | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 344 of file Object.cpp.
References llvm::copy(), llvm::getTypeName(), llvm::safe_malloc(), llvm::SmallVectorBase< Size_T >::size(), and unwrap().
const char * LLVMGetRelocationValueString | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 353 of file Object.cpp.
uint64_t LLVMGetSectionAddress | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 273 of file Object.cpp.
References unwrap().
LLVMBool LLVMGetSectionContainsSymbol | ( | LLVMSectionIteratorRef | SI, |
LLVMSymbolIteratorRef | Sym | ||
) |
Definition at line 277 of file Object.cpp.
const char * LLVMGetSectionContents | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 266 of file Object.cpp.
References llvm::report_fatal_error(), and unwrap().
const char * LLVMGetSectionName | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 255 of file Object.cpp.
References getName(), llvm::report_fatal_error(), and unwrap().
LLVMSectionIteratorRef LLVMGetSections | ( | LLVMObjectFileRef | ObjectFile | ) |
Deprecated: Use LLVMObjectFileCopySectionIterator instead.
Definition at line 201 of file Object.cpp.
uint64_t LLVMGetSectionSize | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 262 of file Object.cpp.
References unwrap().
uint64_t LLVMGetSymbolAddress | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 314 of file Object.cpp.
References getAddress(), llvm::logAllUnhandledErrors(), OS, llvm::report_fatal_error(), and unwrap().
const char * LLVMGetSymbolName | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 303 of file Object.cpp.
References getName(), llvm::logAllUnhandledErrors(), OS, llvm::report_fatal_error(), and unwrap().
LLVMSymbolIteratorRef LLVMGetSymbols | ( | LLVMObjectFileRef | ObjectFile | ) |
Deprecated: Use LLVMObjectFileCopySymbolIterator instead.
Definition at line 234 of file Object.cpp.
uint64_t LLVMGetSymbolSize | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 325 of file Object.cpp.
References unwrap().
LLVMBool LLVMIsRelocationIteratorAtEnd | ( | LLVMSectionIteratorRef | Section, |
LLVMRelocationIteratorRef | RI | ||
) |
Definition at line 292 of file Object.cpp.
References unwrap().
LLVMBool LLVMIsSectionIteratorAtEnd | ( | LLVMObjectFileRef | ObjectFile, |
LLVMSectionIteratorRef | SI | ||
) |
Deprecated: Use LLVMObjectFileIsSectionIteratorAtEnd instead.
Definition at line 211 of file Object.cpp.
References unwrap().
LLVMBool LLVMIsSymbolIteratorAtEnd | ( | LLVMObjectFileRef | ObjectFile, |
LLVMSymbolIteratorRef | SI | ||
) |
Deprecated: Use LLVMObjectFileIsSymbolIteratorAtEnd instead.
Definition at line 244 of file Object.cpp.
References unwrap().
LLVMBinaryRef LLVMMachOUniversalBinaryCopyObjectForArch | ( | LLVMBinaryRef | BR, |
const char * | Arch, | ||
size_t | ArchLen, | ||
char ** | ErrorMessage | ||
) |
Definition at line 138 of file Object.cpp.
References llvm::Expected< T >::get(), llvm::Expected< T >::takeError(), llvm::toString(), unwrap(), and wrap().
void LLVMMoveToContainingSection | ( | LLVMSectionIteratorRef | Sect, |
LLVMSymbolIteratorRef | Sym | ||
) |
Definition at line 221 of file Object.cpp.
References llvm::object::getSection(), llvm::logAllUnhandledErrors(), OS, llvm::report_fatal_error(), Sym, llvm::Expected< T >::takeError(), and unwrap().
void LLVMMoveToNextRelocation | ( | LLVMRelocationIteratorRef | RI | ) |
Definition at line 297 of file Object.cpp.
References unwrap().
void LLVMMoveToNextSection | ( | LLVMSectionIteratorRef | SI | ) |
Definition at line 217 of file Object.cpp.
References unwrap().
void LLVMMoveToNextSymbol | ( | LLVMSymbolIteratorRef | SI | ) |
Definition at line 250 of file Object.cpp.
References unwrap().
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 152 of file Object.cpp.
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 166 of file Object.cpp.
LLVMBool LLVMObjectFileIsSectionIteratorAtEnd | ( | LLVMBinaryRef | BR, |
LLVMSectionIteratorRef | SI | ||
) |
Returns whether the given section iterator is at the end.
Definition at line 160 of file Object.cpp.
References unwrap().
LLVMBool LLVMObjectFileIsSymbolIteratorAtEnd | ( | LLVMBinaryRef | BR, |
LLVMSymbolIteratorRef | SI | ||
) |
Returns whether the given symbol iterator is at the end.
Definition at line 174 of file Object.cpp.
References unwrap().