simple.carbon 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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: %.1: type = tuple_type () [template]
  12. // CHECK:STDOUT: }
  13. // CHECK:STDOUT:
  14. // CHECK:STDOUT: file {
  15. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  16. // CHECK:STDOUT: .F = %F
  17. // CHECK:STDOUT: .G = %G
  18. // CHECK:STDOUT: }
  19. // CHECK:STDOUT: %F: <function> = fn_decl @F [template] {}
  20. // CHECK:STDOUT: %G: <function> = fn_decl @G [template] {}
  21. // CHECK:STDOUT: }
  22. // CHECK:STDOUT:
  23. // CHECK:STDOUT: fn @F();
  24. // CHECK:STDOUT:
  25. // CHECK:STDOUT: fn @G() {
  26. // CHECK:STDOUT: !entry:
  27. // CHECK:STDOUT: %F.ref: <function> = name_ref F, file.%F [template = file.%F]
  28. // CHECK:STDOUT: %.loc9: init () = call %F.ref()
  29. // CHECK:STDOUT: return
  30. // CHECK:STDOUT: }
  31. // CHECK:STDOUT: