global_decl.carbon 1.1 KB

123456789101112131415161718192021222324252627
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/var/no_prelude/global_decl.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/global_decl.carbon
  10. var x: {.v: ()};
  11. // CHECK:STDOUT: --- global_decl.carbon
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: constants {
  14. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
  15. // CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template]
  16. // CHECK:STDOUT: }
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: file {
  19. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  20. // CHECK:STDOUT: .x = %x
  21. // CHECK:STDOUT: }
  22. // CHECK:STDOUT: %x.var: ref %struct_type.v = var x
  23. // CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var
  24. // CHECK:STDOUT: }
  25. // CHECK:STDOUT: