summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-07-11 23:10:18 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-07-11 23:10:18 +0000
commite75aa6f674ce90570fba9e5a3600535cba12a016 (patch)
tree8f2b3cbf8ccbda75c65ceaa416d8c99ca2061acc /llvm/include/llvm-c
parentc9c5405b52dd8063c4a2253f1824bcaf519a39ca (diff)
downloadbcm5719-llvm-e75aa6f674ce90570fba9e5a3600535cba12a016.tar.gz
bcm5719-llvm-e75aa6f674ce90570fba9e5a3600535cba12a016.zip
Add a libLTO API to query a memory buffer and check if it contains ObjC categories
The linker supports a feature to force load an object from a static archive if it defines an Objective-C category. This API supports this feature by looking at every section in the module to find if a category is defined in the module. llvm-svn: 275125
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/lto.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h
index 39acdc7c7dc..655aedcd3d0 100644
--- a/llvm/include/llvm-c/lto.h
+++ b/llvm/include/llvm-c/lto.h
@@ -44,7 +44,7 @@ typedef bool lto_bool_t;
* @{
*/
-#define LTO_API_VERSION 19
+#define LTO_API_VERSION 20
/**
* \since prior to LTO_API_VERSION=3
@@ -136,12 +136,20 @@ lto_module_is_object_file_for_target(const char* path,
const char* target_triple_prefix);
/**
- * Checks if a buffer is a loadable object file.
+ * Return true if \p Buffer contains a bitcode file with ObjC code (category
+ * or class) in it.
*
- * \since prior to LTO_API_VERSION=3
+ * \since LTO_API_VERSION=20
*/
-extern lto_bool_t
-lto_module_is_object_file_in_memory(const void* mem, size_t length);
+bool lto_module_has_objc_category(const void *mem, size_t length);
+
+/**
+* Checks if a buffer is a loadable object file.
+*
+* \since prior to LTO_API_VERSION=3
+*/
+extern lto_bool_t lto_module_is_object_file_in_memory(const void *mem,
+ size_t length);
/**
* Checks if a buffer is a loadable object compiled for requested target.
OpenPOWER on IntegriCloud