mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +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:
+3
-2
@@ -33,11 +33,12 @@ fn F(a: bool, b: bool, c: bool) -> i32 {
|
||||
// CHECK:STDOUT: .Core = %Core
|
||||
// CHECK:STDOUT: .F = %F.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: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool]
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+4, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type.loc11_9 [template = bool]
|
||||
|
||||
Reference in New Issue
Block a user