mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 14:31:19 +00:00
Give files shorthand names in textual SemIR (#8104)
Shorthand names are intended to be used in the textual format of references to instructions in another IR (which can't happen now, but will be possible in a forthcoming PR). The shorthand name uses the file name (minus the `.carbon` suffix) as a base, and if that base name is ambiguous within the compilation, it is given a numerical suffix `.N`, just like other textual IR names. Shorthand names are prefixed with `$` in the textual format, to distinguish them from inst and scope names. For example, a file `foo/bar.carbon` has the shorthand name `$bar`, and an instruction `@baz.%qux` in that file can be referenced from another file as `$bar.@baz.%qux`. This PR adds `toolchain/check/testdata/basics/file_name.carbon` to test this behavior. All other test changes are just applying this change to the existing textual SemIR dumps. --------- Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
1 parent
54728e47fe
commit
e67b6db910
790 files changed
+2398
-2479
No files matched your search
+13
-13
@@ -499,7 +499,7 @@ fn InitFromStruct() {
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- implicit_conversions.carbon
|
||||
// CHECK:STDOUT: --- implicit_conversions.carbon = $implicit_conversions
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -657,7 +657,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_expr_category.carbon
|
||||
// CHECK:STDOUT: --- fail_expr_category.carbon = $fail_expr_category
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -692,7 +692,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_access.carbon
|
||||
// CHECK:STDOUT: --- fail_access.carbon = $fail_access
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -813,7 +813,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_deleted.carbon
|
||||
// CHECK:STDOUT: --- fail_deleted.carbon = $fail_deleted
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -871,7 +871,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_explicit.carbon
|
||||
// CHECK:STDOUT: --- fail_explicit.carbon = $fail_explicit
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -929,7 +929,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- i32_to_int.carbon
|
||||
// CHECK:STDOUT: --- i32_to_int.carbon = $i32_to_int
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -997,7 +997,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_no_u32_to_int_conversion_in_carbon.carbon
|
||||
// CHECK:STDOUT: --- fail_no_u32_to_int_conversion_in_carbon.carbon = $fail_no_u32_to_int_conversion_in_carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -1067,7 +1067,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- default_constructor.carbon
|
||||
// CHECK:STDOUT: --- default_constructor.carbon = $default_constructor
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -1134,7 +1134,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- construct_multi_argument.carbon
|
||||
// CHECK:STDOUT: --- construct_multi_argument.carbon = $construct_multi_argument
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -1357,7 +1357,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_aggregate_from_tuple.carbon
|
||||
// CHECK:STDOUT: --- fail_todo_aggregate_from_tuple.carbon = $fail_todo_aggregate_from_tuple
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -1420,7 +1420,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_aggregate_from_struct.carbon
|
||||
// CHECK:STDOUT: --- fail_todo_aggregate_from_struct.carbon = $fail_todo_aggregate_from_struct
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -1483,7 +1483,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- non_aggregate_from_tuple.carbon
|
||||
// CHECK:STDOUT: --- non_aggregate_from_tuple.carbon = $non_aggregate_from_tuple
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
@@ -1659,7 +1659,7 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_non_aggregate_from_struct.carbon
|
||||
// CHECK:STDOUT: --- fail_non_aggregate_from_struct.carbon = $fail_non_aggregate_from_struct
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
|
||||
Reference in new issue
Block a user