[cfe-dev] extending ClangTool libASTUnit saving and loading

Richard Smith richard at metafoo.co.uk
Thu Dec 18 18:42:28 PST 2014


On Wed, Dec 17, 2014 at 1:51 PM, mobi phil <mobi at mobiphil.com> wrote:
>
> C++ modules are still pretty experimental.
>>
> so.. this sounds that would be almost impossible to build llvm/clang with
> modules...
>

Clang and LLVM build fine with modules enabled; we have a buildbot that
tests this on every commit. You need a suitably-configured system (with
module maps for your C and C++ standard libraries), though.

now back to "clang -c Sema.ast" ... isn't it fair to intuitively assume
> that it would treat the ast as a precompiled unit with all the ingredients
> (headers) instead of PCH? In best case clang should recognize what kind of
> ast is behind and behave accordingly?
>

That's a reasonable assumption, but the question is, what code should we
generate when you compile from an AST file like this? Right now, we
generate code for all the externally-visible definitions in the AST file
(and we do the same thing whether the AST file is a preamble, a PCH, or a
module). That's liable to change in the future (in particular, we may
introduce a mechanism to say "do not generate definitions for an inline
function in a module in every user of the module; instead, generate the
code once from the module itself").
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141218/3066d698/attachment.html>


More information about the cfe-dev mailing list