From 3d224bcb822081c4aa54a82d514bea07f7c459fe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 4 Oct 2021 10:52:15 +0200 Subject: Optimize internal scope implementation --- libbuild2/cc/common.hxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'libbuild2/cc/common.hxx') diff --git a/libbuild2/cc/common.hxx b/libbuild2/cc/common.hxx index 6e36f8e..7d8424f 100644 --- a/libbuild2/cc/common.hxx +++ b/libbuild2/cc/common.hxx @@ -180,14 +180,16 @@ namespace build2 bool modules; // x.features.modules bool symexport; // x.features.symexport - const string* internal_scope; // x.internal.scope - const scope* internal_scope_current; + enum class internal_scope {current, base, root, bundle, strong, weak}; - const strings* c_internal_libs; // cc.internal.libs - const strings* x_internal_libs; // x.internal.libs + optional iscope; // x.internal.scope + const scope* iscope_current; const scope* - effective_internal_scope (const scope& bs) const; + effective_iscope (const scope& bs) const; + + const strings* c_ilibs; // cc.internal.libs + const strings* x_ilibs; // x.internal.libs build2::cc::importable_headers* importable_headers; @@ -250,7 +252,7 @@ namespace build2 const string& env_cs, bool fm, bool fs, - const string* ints, const scope* intsc, + optional is, const scope* isc, const strings* cils, const strings* xils, const dir_paths& sld, const dir_paths& shd, @@ -274,8 +276,8 @@ namespace build2 env_checksum (env_cs), modules (fm), symexport (fs), - internal_scope (ints), internal_scope_current (intsc), - c_internal_libs (cils), x_internal_libs (xils), + iscope (is), iscope_current (isc), + c_ilibs (cils), x_ilibs (xils), importable_headers (nullptr), sys_lib_dirs (sld), sys_hdr_dirs (shd), sys_mod_dirs (smd), sys_lib_dirs_mode (slm), sys_hdr_dirs_mode (shm), -- cgit v1.1