From 7a141264e858c98053367910c6300c79de7bdb98 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 5 Jul 2017 15:49:55 +0200 Subject: Keep track of translation unit type, make own BMI for impl unit first --- build2/cc/types.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build2/cc/types.hxx') 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. -- cgit v1.1