aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-30 09:05:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-30 13:03:07 +0200
commit449f183b9eb4da6ceb97fdb5fda1c767760315c2 (patch)
tree336d5b4fdebc0a816ebe9fdcd38f2319ec97aa37 /libbuild2/cc/types.hxx
parentc0303569afe979f3965228835ac902dce2e940c2 (diff)
Add support for module partitions
Diffstat (limited to 'libbuild2/cc/types.hxx')
-rw-r--r--libbuild2/cc/types.hxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/libbuild2/cc/types.hxx b/libbuild2/cc/types.hxx
index 0a6b6cc..20b67c2 100644
--- a/libbuild2/cc/types.hxx
+++ b/libbuild2/cc/types.hxx
@@ -36,20 +36,35 @@ namespace build2
// header unit is an "interface unit" for (a part of) the global module
// (maybe a partition).
//
+ // Note also that implementation paritions produce BMIs and are, in a
+ // sense, module-private interfaces.
+ //
enum class unit_type
{
non_modular,
- module_iface,
+ module_intf,
module_impl,
+ module_intf_part,
+ module_impl_part,
+ module_header
+ };
+
+ // Note that an interface partition can be imported both as an interface
+ // (with export) and as implementation (without export).
+ //
+ enum class import_type
+ {
+ module_intf,
+ module_part,
module_header
};
struct module_import
{
- unit_type type; // Either module_iface or module_header.
- string name;
- bool exported; // True if re-exported (export import M;).
- size_t score; // Match score (see compile::search_modules()).
+ import_type type;
+ string name;
+ bool exported; // True if re-exported (export import M;).
+ size_t score; // Match score (see compile::search_modules()).
};
using module_imports = vector<module_import>;