tuple_param.carbon 1.1 KB

12345678910111213141516171819202122232425262728293031
  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. fn F(a: (), b: (i32,), c: (i32, i32)) {}
  7. fn Main() {
  8. F((), (1,), (2, 3));
  9. }
  10. // CHECK:STDOUT: ; ModuleID = 'tuple_param.carbon'
  11. // CHECK:STDOUT: source_filename = "tuple_param.carbon"
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: define void @F({ i32 } %b, ptr %c) {
  14. // CHECK:STDOUT: ret void
  15. // CHECK:STDOUT: }
  16. // CHECK:STDOUT:
  17. // CHECK:STDOUT: define void @Main() {
  18. // CHECK:STDOUT: %tuple = alloca { i32, i32 }, align 8
  19. // CHECK:STDOUT: %1 = getelementptr inbounds { i32, i32 }, ptr %tuple, i32 0, i32 0
  20. // CHECK:STDOUT: store i32 2, ptr %1, align 4
  21. // CHECK:STDOUT: %2 = getelementptr inbounds { i32, i32 }, ptr %tuple, i32 0, i32 1
  22. // CHECK:STDOUT: store i32 3, ptr %2, align 4
  23. // CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr %tuple)
  24. // CHECK:STDOUT: ret void
  25. // CHECK:STDOUT: }
  26. // CHECK:STDOUT:
  27. // CHECK:STDOUT: ; uselistorder directives
  28. // CHECK:STDOUT: uselistorder i32 1, { 2, 0, 1 }