order.carbon 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 Bar() {}
  8. fn Baz() {}
  9. // CHECK:STDOUT: --- order.carbon
  10. // CHECK:STDOUT:
  11. // CHECK:STDOUT: constants {
  12. // CHECK:STDOUT: %Foo: type = fn_type @Foo [template]
  13. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  14. // CHECK:STDOUT: %struct.1: Foo = struct_value () [template]
  15. // CHECK:STDOUT: %Bar: type = fn_type @Bar [template]
  16. // CHECK:STDOUT: %struct.2: Bar = struct_value () [template]
  17. // CHECK:STDOUT: %Baz: type = fn_type @Baz [template]
  18. // CHECK:STDOUT: %struct.3: Baz = struct_value () [template]
  19. // CHECK:STDOUT: }
  20. // CHECK:STDOUT:
  21. // CHECK:STDOUT: file {
  22. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  23. // CHECK:STDOUT: .Foo = %Foo.decl
  24. // CHECK:STDOUT: .Bar = %Bar.decl
  25. // CHECK:STDOUT: .Baz = %Baz.decl
  26. // CHECK:STDOUT: }
  27. // CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.1] {}
  28. // CHECK:STDOUT: %Bar.decl: Bar = fn_decl @Bar [template = constants.%struct.2] {}
  29. // CHECK:STDOUT: %Baz.decl: Baz = fn_decl @Baz [template = constants.%struct.3] {}
  30. // CHECK:STDOUT: }
  31. // CHECK:STDOUT:
  32. // CHECK:STDOUT: fn @Foo() {
  33. // CHECK:STDOUT: !entry:
  34. // CHECK:STDOUT: return
  35. // CHECK:STDOUT: }
  36. // CHECK:STDOUT:
  37. // CHECK:STDOUT: fn @Bar() {
  38. // CHECK:STDOUT: !entry:
  39. // CHECK:STDOUT: return
  40. // CHECK:STDOUT: }
  41. // CHECK:STDOUT:
  42. // CHECK:STDOUT: fn @Baz() {
  43. // CHECK:STDOUT: !entry:
  44. // CHECK:STDOUT: return
  45. // CHECK:STDOUT: }
  46. // CHECK:STDOUT: