diff options
Diffstat (limited to 'llvm/include/llvm-c/Object.h')
-rw-r--r-- | llvm/include/llvm-c/Object.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Object.h b/llvm/include/llvm-c/Object.h index a32f6514094..1e9b703a68f 100644 --- a/llvm/include/llvm-c/Object.h +++ b/llvm/include/llvm-c/Object.h @@ -102,6 +102,22 @@ LLVMMemoryBufferRef LLVMBinaryCopyMemoryBuffer(LLVMBinaryRef BR); */ LLVMBinaryType LLVMBinaryGetType(LLVMBinaryRef BR); +/* + * For a Mach-O universal binary file, retrieves the object file corresponding + * to the given architecture if it is present as a slice. + * + * If NULL is returned, the \p ErrorMessage parameter is populated with the + * error's description. It is then the caller's responsibility to free this + * message by calling \c LLVMDisposeMessage. + * + * It is the responsiblity of the caller to free the returned object file by + * calling \c LLVMDisposeBinary. + */ +LLVMBinaryRef LLVMMachOUniversalBinaryCopyObjectForArch(LLVMBinaryRef BR, + const char *Arch, + size_t ArchLen, + char **ErrorMessage); + /** * Retrieve a copy of the section iterator for this object file. * |