aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-05 15:49:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-05 15:49:55 +0200
commit7a141264e858c98053367910c6300c79de7bdb98 (patch)
tree9e3253649c1709526c0f5cda3c82455a77f7280e /build2/cc/types.hxx
parentbe14f6c87cb3eeb9e3a2ac93802c9c236c191aa5 (diff)
Keep track of translation unit type, make own BMI for impl unit first
Diffstat (limited to 'build2/cc/types.hxx')
-rw-r--r--build2/cc/types.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/build2/cc/types.hxx b/build2/cc/types.hxx
index 3448827..3170942 100644
--- a/build2/cc/types.hxx
+++ b/build2/cc/types.hxx
@@ -32,9 +32,19 @@ namespace build2
module_imports imports; // Imported modules.
};
+ enum class translation_type {plain, module_iface, module_impl};
+
struct translation_unit
{
module_info mod;
+
+ translation_type
+ type () const
+ {
+ return (mod.name.empty () ? translation_type::plain :
+ mod.iface ? translation_type::module_iface
+ : translation_type::module_impl);
+ }
};
// Compiler language.