Add a libLTO API to query a memory buffer and check if it contains ObjC categories
authorMehdi Amini <mehdi.amini@apple.com>
Mon, 11 Jul 2016 23:10:18 +0000 (23:10 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Mon, 11 Jul 2016 23:10:18 +0000 (23:10 +0000)
commite75aa6f674ce90570fba9e5a3600535cba12a016
tree8f2b3cbf8ccbda75c65ceaa416d8c99ca2061acc
parentc9c5405b52dd8063c4a2253f1824bcaf519a39ca
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
llvm/include/llvm-c/lto.h
llvm/include/llvm/Bitcode/ReaderWriter.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/LTO/X86/objc-detection-i386.ll [new file with mode: 0644]
llvm/test/LTO/X86/objc-detection.ll [new file with mode: 0644]
llvm/tools/llvm-lto/llvm-lto.cpp
llvm/tools/lto/lto.cpp
llvm/tools/lto/lto.exports