From ccb417a7c1456427b76914e8a11ca87b4926eeb3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Jan 2020 08:41:57 +0200 Subject: Use scope::var_pool() --- libbuild2/cc/init.cxx | 54 ++++++++++++++++++++++++------------------------- libbuild2/cc/module.cxx | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'libbuild2/cc') diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx index a495519..0536e0f 100644 --- a/libbuild2/cc/init.cxx +++ b/libbuild2/cc/init.cxx @@ -78,41 +78,41 @@ namespace build2 // Enter variables. Note: some overridable, some not. // - auto& v (rs.ctx.var_pool.rw (rs)); + auto& vp (rs.var_pool ()); auto v_t (variable_visibility::target); // NOTE: remember to update documentation if changing anything here. // - v.insert ("config.cc.poptions", true); - v.insert ("config.cc.coptions", true); - v.insert ("config.cc.loptions", true); - v.insert ("config.cc.aoptions", true); - v.insert ("config.cc.libs", true); + vp.insert ("config.cc.poptions", true); + vp.insert ("config.cc.coptions", true); + vp.insert ("config.cc.loptions", true); + vp.insert ("config.cc.aoptions", true); + vp.insert ("config.cc.libs", true); - v.insert ("cc.poptions"); - v.insert ("cc.coptions"); - v.insert ("cc.loptions"); - v.insert ("cc.aoptions"); - v.insert ("cc.libs"); + vp.insert ("cc.poptions"); + vp.insert ("cc.coptions"); + vp.insert ("cc.loptions"); + vp.insert ("cc.aoptions"); + vp.insert ("cc.libs"); - v.insert ("cc.export.poptions"); - v.insert ("cc.export.coptions"); - v.insert ("cc.export.loptions"); - v.insert> ("cc.export.libs"); + vp.insert ("cc.export.poptions"); + vp.insert ("cc.export.coptions"); + vp.insert ("cc.export.loptions"); + vp.insert> ("cc.export.libs"); // Hint variables (not overridable). // - v.insert ("config.cc.id"); - v.insert ("config.cc.hinter"); // Hinting module. - v.insert ("config.cc.pattern"); - v.insert ("config.cc.mode"); - v.insert ("config.cc.target"); + vp.insert ("config.cc.id"); + vp.insert ("config.cc.hinter"); // Hinting module. + vp.insert ("config.cc.pattern"); + vp.insert ("config.cc.mode"); + vp.insert ("config.cc.target"); // Compiler runtime and C standard library. // - v.insert ("cc.runtime"); - v.insert ("cc.stdlib"); + vp.insert ("cc.runtime"); + vp.insert ("cc.stdlib"); // Target type, for example, "C library" or "C++ library". Should be set // on the target as a rule-specific variable by the matching rule to the @@ -124,23 +124,23 @@ namespace build2 // but specific language is not known. Used in the import installed // logic. // - v.insert ("cc.type", v_t); + vp.insert ("cc.type", v_t); // If set and is true, then this (imported) library has been found in a // system library search directory. // - v.insert ("cc.system", v_t); + vp.insert ("cc.system", v_t); // C++ module name. Set on the bmi*{} target as a rule-specific variable // by the matching rule. Can also be set by the user (normally via the // x.module_name alias) on the x_mod{} source. // - v.insert ("cc.module_name", v_t); + vp.insert ("cc.module_name", v_t); // Ability to disable using preprocessed output for compilation. // - v.insert ("config.cc.reprocess", true); - v.insert ("cc.reprocess"); + vp.insert ("config.cc.reprocess", true); + vp.insert ("cc.reprocess"); // Register scope operation callback. // diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx index 95b42bd..69530a2 100644 --- a/libbuild2/cc/module.cxx +++ b/libbuild2/cc/module.cxx @@ -41,7 +41,7 @@ namespace build2 config::save_module (rs, x, 250); - auto& vp (rs.ctx.var_pool.rw (rs)); + auto& vp (rs.var_pool ()); // Must already exist. // -- cgit v1.1