param_same_name.carbon 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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: i32);
  7. fn G(a: i32);
  8. // CHECK:STDOUT: --- param_same_name.carbon
  9. // CHECK:STDOUT:
  10. // CHECK:STDOUT: constants {
  11. // CHECK:STDOUT: %F: type = fn_type @F [template]
  12. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  13. // CHECK:STDOUT: %struct.1: F = struct_value () [template]
  14. // CHECK:STDOUT: %G: type = fn_type @G [template]
  15. // CHECK:STDOUT: %struct.2: G = struct_value () [template]
  16. // CHECK:STDOUT: }
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: file {
  19. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  20. // CHECK:STDOUT: .Core = %Core
  21. // CHECK:STDOUT: .F = %F.decl
  22. // CHECK:STDOUT: .G = %G.decl
  23. // CHECK:STDOUT: }
  24. // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
  25. // CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {
  26. // CHECK:STDOUT: %a.loc7_6.1: i32 = param a
  27. // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc7_6.1
  28. // CHECK:STDOUT: }
  29. // CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {
  30. // CHECK:STDOUT: %a.loc9_6.1: i32 = param a
  31. // CHECK:STDOUT: @G.%a: i32 = bind_name a, %a.loc9_6.1
  32. // CHECK:STDOUT: }
  33. // CHECK:STDOUT: }
  34. // CHECK:STDOUT:
  35. // CHECK:STDOUT: fn @F(%a: i32);
  36. // CHECK:STDOUT:
  37. // CHECK:STDOUT: fn @G(%a: i32);
  38. // CHECK:STDOUT: