mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Remove ImportRefUsed (#3934)
This was to track use of a declaration after import, prior to a redeclaration. Per [discussion on Discord](https://discord.com/channels/655572317891461132/1217182321933815820/1236016521059237962), we likely don't need this check due to the change in behavior of `extern`. Rather than potentially getting one of many `extern` decls and depending on it by accident, it is now planned to be _required_ to be imported, and the library doing a non-`extern` decl must _know_ it's importing the `extern` decl. The stricter requirement on the library means it now seems more reasonable to use the `extern` decl. So kind of rolling back #3831, though keeping `ImportIRInstId` (at least for now) and keeping `Loaded`/`Unloaded` terminology (seems a nicer fit).
This commit is contained in:
+2
-2
@@ -106,8 +106,8 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref;
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1: ref {.a: i32} = import_ref ir0, inst+7, loc_15
|
||||
// CHECK:STDOUT: %import_ref.2: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = import_ref ir0, inst+38, loc_45
|
||||
// CHECK:STDOUT: %import_ref.1: ref {.a: i32} = import_ref ir0, inst+7, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = import_ref ir0, inst+38, loaded
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %.loc4: type = struct_type {.a: i32} [template = constants.%.1]
|
||||
// CHECK:STDOUT: %a.var: ref {.a: i32} = var a
|
||||
|
||||
Reference in New Issue
Block a user