diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-07 14:12:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-07 14:12:44 +0200 |
commit | f59ecce68b1f274c212a36a07140dba8005e57d9 (patch) | |
tree | 665fb4fab6fd5b66bf55d95303826d418348518f /libbuild2 | |
parent | 233c75cf7ba454b3582b55ea87215ea96cb35c52 (diff) |
Fix bug that led to duplication of module import information
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/cc/compile-rule.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index c7e1d02..985b171 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -1404,6 +1404,10 @@ namespace build2 // if (mt != timestamp_nonexistent) { + // Appended to by to_module_info() below. + // + tu.module_info.imports.clear (); + u = false; md.touch = true; } @@ -5897,7 +5901,7 @@ namespace build2 // promise. It has to do with module re-exporting (export import M;). // In this case (currently) all implementations simply treat it as a // shallow (from the BMI's point of view) reference to the module (or an - // implicit import, if you will). Do you see where it's going? Nowever + // implicit import, if you will). Do you see where it's going? Nowhere // good, that's right. This shallow reference means that the compiler // should be able to find BMIs for all the re-exported modules, // recursively. The good news is we are actually in a pretty good shape @@ -6037,6 +6041,8 @@ namespace build2 continue; // Scan the rest to detect if all done. } } + else + assert (name != m.name); // No duplicates. done = false; } |