Files
carbon-lang/toolchain/check/testdata/tuples/one_element.carbon
T
Jon Ross-Perkins 9ae41b2965 Update SemIR yaml and text for multi-file. (#3217)
Building on #3214 and #3215, updates sem_ir yaml to be:

```
- filename: name
  sem_ir: [ ... ]
```

Also, changes the textual format from `package { ... }` to `file
<filename> { ... }`. My thought on packages there is:

```
file "foo.carbon" {
  package MyPackage

  ...
}
```

The reason for putting the file first is that it's easier if we put what
we're grouping on first, whereas the package is an "annotation" on the
file.
2023-09-13 17:08:18 +00:00

26 lines
1.0 KiB
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// AUTOUPDATE
var x: (i32,) = (4,);
var y: (i32,) = x;
// CHECK:STDOUT: file "one_element.carbon" {
// CHECK:STDOUT: %.loc7_9: type = stub_reference i32
// CHECK:STDOUT: %.loc7_13.1: type = tuple_type (type)
// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_literal (%.loc7_9)
// CHECK:STDOUT: %.loc7_13.3: type = tuple_type (i32)
// CHECK:STDOUT: %x: ref (i32,) = var "x"
// CHECK:STDOUT: %.loc7_18.1: i32 = int_literal 4
// CHECK:STDOUT: %.loc7_18.2: i32 = stub_reference %.loc7_18.1
// CHECK:STDOUT: %.loc7_20: (i32,) = tuple_literal (%.loc7_18.2)
// CHECK:STDOUT: assign %x, %.loc7_20
// CHECK:STDOUT: %.loc8_9: type = stub_reference i32
// CHECK:STDOUT: %.loc8_13: (type,) = tuple_literal (%.loc8_9)
// CHECK:STDOUT: %y: ref (i32,) = var "y"
// CHECK:STDOUT: %.loc7_5: (i32,) = bind_value %x
// CHECK:STDOUT: assign %y, %.loc7_5
// CHECK:STDOUT: }