From 8c30c59de2d304a416dfd4fcb821e0b227e5db96 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Sep 2019 15:57:52 +0200 Subject: Rename importable_headers variable to translatable_headers This name aligns better with the post-Cologne importable/translatable semantics. --- libbuild2/cc/compile-rule.cxx | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'libbuild2/cc/compile-rule.cxx') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index 450fbe9..d6adfd3 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -876,8 +876,8 @@ namespace build2 if (ut == unit_type::module_iface) cs.append (&md.symexport, sizeof (md.symexport)); - if (import_hdr != nullptr) - hash_options (cs, *import_hdr); + if (xlate_hdr != nullptr) + hash_options (cs, *xlate_hdr); if (md.pp != preprocessed::all) { @@ -2027,19 +2027,17 @@ namespace build2 // Reduce include translation to the import case. // - if (!imp && import_hdr != nullptr) + if (!imp && xlate_hdr != nullptr) { - const strings& ih (*import_hdr); - - auto i (lower_bound (ih.begin (), - ih.end (), - hp, - [] (const string& x, const string& y) - { - return path::traits_type::compare (x, y) < 0; - })); + auto i (lower_bound ( + xlate_hdr->begin (), xlate_hdr->end (), + hp, + [] (const string& x, const string& y) + { + return path::traits_type::compare (x, y) < 0; + })); - imp = (i != ih.end () && *i == hp); + imp = (i != xlate_hdr->end () && *i == hp); } if (imp) -- cgit v1.1