mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:54:49 +01:00
Add a location to indirect imports. (#4098)
By adding an `ImportDecl` instruction, this creates something that can be referenced through `ImportIRInst`. packages/no_prelude/implicit_imports_entities.carbon is getting a test of this (import_conflict and import_conflict_reverse). Also re-packs ImportIR from 24 bytes to 16 on 64-bit, since I'm touching everywhere that makes one anyways.
This commit is contained in:
+4
-3
@@ -54,10 +54,11 @@ fn MakeOuter() -> Outer {
|
||||
// CHECK:STDOUT: .Outer = %Outer.decl
|
||||
// CHECK:STDOUT: .MakeOuter = %MakeOuter.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace %Core.import, [template] {}
|
||||
// CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {}
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %MakeInner.decl: %MakeInner.type = fn_decl @MakeInner [template = constants.%MakeInner] {
|
||||
// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %Inner.decl [template = constants.%Inner]
|
||||
// CHECK:STDOUT: @MakeInner.%return: ref %Inner = var <return slot>
|
||||
|
||||
Reference in New Issue
Block a user