value.carbon 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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 Main() -> i32 {
  7. return 0;
  8. }
  9. // CHECK:STDOUT: --- value.carbon
  10. // CHECK:STDOUT:
  11. // CHECK:STDOUT: constants {
  12. // CHECK:STDOUT: %Main: type = fn_type @Main [template]
  13. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  14. // CHECK:STDOUT: %struct: Main = struct_value () [template]
  15. // CHECK:STDOUT: %.2: i32 = int_literal 0 [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: .Main = %Main.decl
  22. // CHECK:STDOUT: }
  23. // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
  24. // CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {
  25. // CHECK:STDOUT: @Main.%return: ref i32 = var <return slot>
  26. // CHECK:STDOUT: }
  27. // CHECK:STDOUT: }
  28. // CHECK:STDOUT:
  29. // CHECK:STDOUT: fn @Main() -> i32 {
  30. // CHECK:STDOUT: !entry:
  31. // CHECK:STDOUT: %.loc8: i32 = int_literal 0 [template = constants.%.2]
  32. // CHECK:STDOUT: return %.loc8
  33. // CHECK:STDOUT: }
  34. // CHECK:STDOUT: