simple.carbon 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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();
  7. fn G() { F(); }
  8. // CHECK:STDOUT: --- simple.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: .F = %F.decl
  21. // CHECK:STDOUT: .G = %G.decl
  22. // CHECK:STDOUT: }
  23. // CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {}
  24. // CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {}
  25. // CHECK:STDOUT: }
  26. // CHECK:STDOUT:
  27. // CHECK:STDOUT: fn @F();
  28. // CHECK:STDOUT:
  29. // CHECK:STDOUT: fn @G() {
  30. // CHECK:STDOUT: !entry:
  31. // CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1]
  32. // CHECK:STDOUT: %F.call: init () = call %F.ref()
  33. // CHECK:STDOUT: return
  34. // CHECK:STDOUT: }
  35. // CHECK:STDOUT: