mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 09:41:08 +01:00
Form-aware textual format for return parameters and arguments (#6588)
The key changes are: - Function output parameters are now prefixed with `out`, and more consistently formatted as named parameters. - Function and inst output arguments are now written as part of the inst form, rather than as one of the inst arguments. As a drive-by fix, this also changes `Temporary::storage_id` from `DestInstId` to `InstId`, because it doesn't represent an output parameter of the `Temporary` inst itself. See the review of [#6532](https://github.com/carbon-language/carbon-lang/pull/6532) and [this Discord discussion](https://discord.com/channels/655572317891461132/999638000126394370/1458268977020141589) for additional background.
This commit is contained in:
@@ -117,7 +117,7 @@ fn F() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %s.var: ref %S = var %s.var_patt
|
||||
// CHECK:STDOUT: %.loc10_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc10_19.2: init %S = class_init (), %s.var [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: %.loc10_19.2: init %S to %s.var = class_init () [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: %.loc10_3: init %S = converted %.loc10_19.1, %.loc10_19.2 [concrete = constants.%S.val]
|
||||
// CHECK:STDOUT: assign %s.var, %.loc10_3
|
||||
// CHECK:STDOUT: %.loc10_13: type = splice_block %S.ref [concrete = constants.%S] {
|
||||
|
||||
Reference in New Issue
Block a user