summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Object.h
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2019-05-25 16:47:27 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2019-05-25 16:47:27 +0000
commitb0fd12b689297dfb3bb70a6d5dfabb6bebf93ed1 (patch)
tree5beb6c14152f2a342d30e92dafb252be0d0fee7b /llvm/include/llvm-c/Object.h
parentd87eceda0e6d5de6b2d58430a0124b6f7428695d (diff)
downloadbcm5719-llvm-b0fd12b689297dfb3bb70a6d5dfabb6bebf93ed1.tar.gz
bcm5719-llvm-b0fd12b689297dfb3bb70a6d5dfabb6bebf93ed1.zip
[LLVM-C] Add Accessor for Mach-O Universal Binary Slices
Summary: Allow for retrieving an object file corresponding to an architecture-specific slice in a Mach-O universal binary file. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60378 llvm-svn: 361705
Diffstat (limited to 'llvm/include/llvm-c/Object.h')
-rw-r--r--llvm/include/llvm-c/Object.h16
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.
*
OpenPOWER on IntegriCloud