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
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h
index 39acdc7..655aedc 100644
--- a/llvm/include/llvm-c/lto.h
+++ b/llvm/include/llvm-c/lto.h
@@ -44,7 +44,7 @@
  * @{
  */
 
-#define LTO_API_VERSION 19
+#define LTO_API_VERSION 20
 
 /**
  * \since prior to LTO_API_VERSION=3
@@ -136,12 +136,20 @@
                                      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.