mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:54:47 +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:
+1
-1
@@ -99,7 +99,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%p.param: %const.fa2) -> %const.20a {
|
||||
// CHECK:STDOUT: fn @F(%p.param: %const.fa2) -> out %return.param: %const.20a {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %const.fa2 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc17_11.1: ref %const.58f = deref %p.ref
|
||||
|
||||
Reference in New Issue
Block a user