Implement a list of exported names for imports. (#3552)

This adds a block for exported InstIds, rather than scanning the package
scope. This working down a path discussed last month, which we'll need
to add enclosing namespaces to the Inst in order to complete import of
something like `namespace NS; var NS.a;`

Exports could've been a separate `vector<InstId>` on `SemIR::File`, but
using an entry in `inst_blocks` felt more consistent.
This commit is contained in:
Jon Ross-Perkins
2024-01-02 22:17:27 +00:00
committed by GitHub
parent 13b8c33c79
commit b6ffe0197b
13 changed files with 118 additions and 51 deletions
@@ -40,7 +40,7 @@ class C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: %.loc17: i32 = block_arg <unexpected instblockref block4>
// CHECK:STDOUT: %.loc17: i32 = block_arg <unexpected instblockref block5>
// CHECK:STDOUT: %x: i32 = bind_name x, %.loc17
// CHECK:STDOUT: %C.decl = class_decl @C, ()
// CHECK:STDOUT: %C: type = class_type @C