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:
Vendored
+4
-4
@@ -179,10 +179,10 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+1, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: ReturnCUnused = import_ref ir1, inst+7, loc_14 [template = constants.%struct.2]
|
||||
// CHECK:STDOUT: %import_ref.4: ReturnCUsed = import_ref ir1, inst+13, loc_18 [template = constants.%struct.3]
|
||||
// CHECK:STDOUT: %import_ref.5: ReturnDUnused = import_ref ir1, inst+18, loc_22 [template = constants.%struct.4]
|
||||
// CHECK:STDOUT: %import_ref.6: ReturnDUsed = import_ref ir1, inst+23, loc_26 [template = constants.%struct.5]
|
||||
// CHECK:STDOUT: %import_ref.3: ReturnCUnused = import_ref ir1, inst+7, loaded [template = constants.%struct.2]
|
||||
// CHECK:STDOUT: %import_ref.4: ReturnCUsed = import_ref ir1, inst+13, loaded [template = constants.%struct.3]
|
||||
// CHECK:STDOUT: %import_ref.5: ReturnDUnused = import_ref ir1, inst+18, loaded [template = constants.%struct.4]
|
||||
// CHECK:STDOUT: %import_ref.6: ReturnDUsed = import_ref ir1, inst+23, loaded [template = constants.%struct.5]
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+26, unloaded
|
||||
// CHECK:STDOUT: %CallFAndGIncomplete.decl: CallFAndGIncomplete = fn_decl @CallFAndGIncomplete [template = constants.%struct.1] {}
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+4, unloaded
|
||||
|
||||
Reference in New Issue
Block a user