empty.carbon 750 B

1234567891011121314151617181920212223
  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. // CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/struct/empty.carbon'
  7. // CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/struct/empty.carbon"
  8. // CHECK:STDOUT:
  9. // CHECK:STDOUT: %0 = type {}
  10. // CHECK:STDOUT:
  11. // CHECK:STDOUT: define i32 @Run() {
  12. // CHECK:STDOUT: entry:
  13. // CHECK:STDOUT: %0 = alloca %0, align 8
  14. // CHECK:STDOUT: %1 = alloca %0, align 8
  15. // CHECK:STDOUT: store ptr %0, ptr %1, align 8
  16. // CHECK:STDOUT: ret i32 0
  17. // CHECK:STDOUT: }
  18. fn Run() -> i32 {
  19. var x: {} = {};
  20. var y: {} = x;
  21. return 0;
  22. }