params_zero.carbon 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 Foo() {}
  7. fn Main() {
  8. Foo();
  9. }
  10. // CHECK:STDOUT: --- params_zero.carbon
  11. // CHECK:STDOUT:
  12. // CHECK:STDOUT: constants {
  13. // CHECK:STDOUT: %Foo: type = fn_type @Foo [template]
  14. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  15. // CHECK:STDOUT: %struct.1: Foo = struct_value () [template]
  16. // CHECK:STDOUT: %Main: type = fn_type @Main [template]
  17. // CHECK:STDOUT: %struct.2: Main = struct_value () [template]
  18. // CHECK:STDOUT: }
  19. // CHECK:STDOUT:
  20. // CHECK:STDOUT: file {
  21. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  22. // CHECK:STDOUT: .Foo = %Foo.decl
  23. // CHECK:STDOUT: .Main = %Main.decl
  24. // CHECK:STDOUT: }
  25. // CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.1] {}
  26. // CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {}
  27. // CHECK:STDOUT: }
  28. // CHECK:STDOUT:
  29. // CHECK:STDOUT: fn @Foo() {
  30. // CHECK:STDOUT: !entry:
  31. // CHECK:STDOUT: return
  32. // CHECK:STDOUT: }
  33. // CHECK:STDOUT:
  34. // CHECK:STDOUT: fn @Main() {
  35. // CHECK:STDOUT: !entry:
  36. // CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.1]
  37. // CHECK:STDOUT: %Foo.call: init () = call %Foo.ref()
  38. // CHECK:STDOUT: return
  39. // CHECK:STDOUT: }
  40. // CHECK:STDOUT: