run_i32.carbon 1.2 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 Run() -> i32 { return 0; }
  7. // CHECK:STDOUT: --- run_i32.carbon
  8. // CHECK:STDOUT:
  9. // CHECK:STDOUT: constants {
  10. // CHECK:STDOUT: %Run: type = fn_type @Run [template]
  11. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  12. // CHECK:STDOUT: %struct: Run = struct_value () [template]
  13. // CHECK:STDOUT: %.2: i32 = int_literal 0 [template]
  14. // CHECK:STDOUT: }
  15. // CHECK:STDOUT:
  16. // CHECK:STDOUT: file {
  17. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  18. // CHECK:STDOUT: .Core = %Core
  19. // CHECK:STDOUT: .Run = %Run.decl
  20. // CHECK:STDOUT: }
  21. // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
  22. // CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct] {
  23. // CHECK:STDOUT: @Run.%return: ref i32 = var <return slot>
  24. // CHECK:STDOUT: }
  25. // CHECK:STDOUT: }
  26. // CHECK:STDOUT:
  27. // CHECK:STDOUT: fn @Run() -> i32 {
  28. // CHECK:STDOUT: !entry:
  29. // CHECK:STDOUT: %.loc7: i32 = int_literal 0 [template = constants.%.2]
  30. // CHECK:STDOUT: return %.loc7
  31. // CHECK:STDOUT: }
  32. // CHECK:STDOUT: