aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dump.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-02-08 11:02:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-02-08 11:02:25 +0200
commit435b3e43dd054a716b3fc67fc34b43267f8e9809 (patch)
tree8e11ad74f0397feee9ffce064d3c6812c740a832 /libbuild2/dump.cxx
parent90d37f3fe126fa7b3d97fb071f537f910bd4a7fa (diff)
Enter scope src directories into scope map
Diffstat (limited to 'libbuild2/dump.cxx')
-rw-r--r--libbuild2/dump.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/libbuild2/dump.cxx b/libbuild2/dump.cxx
index 95c7cae..7cd95dd 100644
--- a/libbuild2/dump.cxx
+++ b/libbuild2/dump.cxx
@@ -438,7 +438,7 @@ namespace build2
scope_map::const_iterator& i,
bool rel)
{
- const scope& p (i->second);
+ const scope& p (*i->second.scope);
const dir_path& d (i->first);
++i;
@@ -484,7 +484,8 @@ namespace build2
vb = true;
}
- // Nested scopes of which we are an immediate parent.
+ // Nested scopes of which we are an immediate parent. Only consider the
+ // out hierarchy.
//
// Note that because we use the logical (rather than physical) parent, we
// will be printing the logical scope hierarchy (i.e., a project with
@@ -492,7 +493,7 @@ namespace build2
// scope).
//
for (auto e (p.ctx.scopes.end ());
- i != e && i->second.parent_scope () == &p; )
+ i != e && i->second.out && i->second.scope->parent_scope () == &p; )
{
if (vb)
{
@@ -541,8 +542,8 @@ namespace build2
void
dump (const context& c, optional<action> a)
{
- auto i (c.scopes.cbegin ());
- assert (&i->second == &c.global_scope);
+ auto i (c.scopes.begin ());
+ assert (i->second.scope == &c.global_scope);
// We don't lock diag_stream here as dump() is supposed to be called from
// the main thread prior/after to any other threads being spawned.
@@ -556,9 +557,9 @@ namespace build2
void
dump (const scope& s, const char* cind)
{
- const scope_map_base& m (s.ctx.scopes); // Iterator interface.
- auto i (m.find (s.out_path ()));
- assert (i != m.end () && &i->second == &s);
+ const scope_map& m (s.ctx.scopes);
+ auto i (m.find_exact (s.out_path ()));
+ assert (i != m.end () && i->second.scope == &s);
string ind (cind);
ostream& os (*diag_stream);