From 57abb0703ec640fdcd0b0ac165f742bbc34df533 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Jun 2017 13:06:38 +0200 Subject: Next installment in C++ modules saga: module search, re-export support --- build2/cc/types.hxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'build2/cc/types.hxx') diff --git a/build2/cc/types.hxx b/build2/cc/types.hxx index 59ea67f..17f6b96 100644 --- a/build2/cc/types.hxx +++ b/build2/cc/types.hxx @@ -8,10 +8,30 @@ #include #include +#include + namespace build2 { namespace cc { + // Translation unit information (currently modules). + // + struct module_import + { + string name; + bool exported; // True if re-exported (export import M;). + size_t score; // See compile::search_modules(). + }; + + using module_imports = vector; + + struct translation_unit + { + string module_name; // Not empty if a module unit. + bool module_interface; // True if a module interface unit. + cc::module_imports module_imports; // Imported modules. + }; + // Compiler language. // enum class lang {c, cxx}; @@ -26,6 +46,14 @@ namespace build2 // enum class otype {e, a, s}; + // Compile target types. + // + struct compile_target_types + { + const target_type& obj; + const target_type& bmi; + }; + // Library link order. // enum class lorder {a, s, a_s, s_a}; -- cgit v1.1