Revision 1 as of 2017-01-24 12:52:59
|Deletions are marked like this.||Additions are marked like this.|
|Line 22:||Line 22:|
A module system is coming to C++, this page describes the GCC implementation state.
The goal of the module system is to avoid huge header files, thus speeding up compilation. What distinguishes it from things like precompiled headers are:
- Not solving the 'preprocessor problem'
- Composabililty of multiple modules
- Explicit code annotations to define visible interfaces
Development branch: 'c++-modules' (svn://gcc.gnu.org/svn/gcc/branches/c++-modules).
The branch was created Jan 2017, so it is very early days, and I expect it to be several months before there's something of interest.
I aim to reuse (with suitable abstraction) as much LTO machinery as possible. LTO currently writes out both type trees and gimple instructions, encapsulating the information into additional sections of the output files. Modules needs to write out both type trees and FE AST, but not gimple. It also needs to read that information back into the FE. The data will probably be emitted into not-the-object-file, which will be similar to PCH behaviour.