[PATCH] Introduce a ModuleProvider interface (NFC)

Adrian Prantl aprantl at apple.com
Tue Jun 16 10:15:09 PDT 2015


Hi Richard,

based on an earlier discussion on cfe-commits, here is an NFC patch that introduces a ModuleProvider interface to handle the physical storage of clang modules. The primary motivation for this is module debugging. The idea is that CodeGen will implement this interface to wrap clang modules in an object file container. Other users of libclang that do not care about debug info can use the default implementation provided in this patch and won’t need to link against CodeGen and LLVM.

The majority of the patch consists of threading the new interface through everywhere, the interesting bits are in AST/ModuleProvider.h and Lex/ModuleLoader.h. There are no changes necessary to clang-tools-extra.

-- adrian



Introduce a ModuleProvider interface (NFC).

A ModuleProvider provides an interface handling the physical storage of
Clang modules. The default implementation is SimpleModuleProvider, which
uses a flat file for the output.

The main application for this interface will be an implementation that 
uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store
debug info alongside the module.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Introduce-a-ModuleProvider-NFC.patch
Type: application/octet-stream
Size: 105567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150616/8525c83c/attachment.obj>


More information about the cfe-commits mailing list