diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-13 09:00:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-13 09:00:11 +0200 |
commit | 219e00f3b8caec38a9c8fbb4d70e33455aba5a92 (patch) | |
tree | af77a460d37589b6ca535cdd8d0100440d9f45a1 /libbuild2/cc | |
parent | 7935281661a3fd50454432fae1bbf4152758137a (diff) |
Optimize by going straight to public variable pool where applicable
Diffstat (limited to 'libbuild2/cc')
-rw-r--r-- | libbuild2/cc/init.cxx | 5 | ||||
-rw-r--r-- | libbuild2/cc/module.cxx | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx index b2f35aa..33a1133 100644 --- a/libbuild2/cc/init.cxx +++ b/libbuild2/cc/init.cxx @@ -86,7 +86,10 @@ namespace build2 // Enter variables. // - auto& vp (rs.var_pool ()); + // All the variables we enter are qualified so go straight for the + // public variable pool. + // + auto& vp (rs.var_pool (true /* public */)); auto v_t (variable_visibility::target); diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx index 27f9d9e..6583001 100644 --- a/libbuild2/cc/module.cxx +++ b/libbuild2/cc/module.cxx @@ -41,7 +41,10 @@ namespace build2 config::save_module (rs, x, 250); - auto& vp (rs.var_pool ()); + // All the variables we enter are qualified so go straight for the + // public variable pool. + // + auto& vp (rs.var_pool (true /* public */)); // Must already exist. // |