builtins.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. alias a = i32;
  7. let a_test: a = 0;
  8. alias b = bool;
  9. let b_test: b = false;
  10. // CHECK:STDOUT: --- builtins.carbon
  11. // CHECK:STDOUT:
  12. // CHECK:STDOUT: constants {
  13. // CHECK:STDOUT: %.1: i32 = int_literal 0 [template]
  14. // CHECK:STDOUT: %.2: bool = bool_literal false [template]
  15. // CHECK:STDOUT: }
  16. // CHECK:STDOUT:
  17. // CHECK:STDOUT: file {
  18. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  19. // CHECK:STDOUT: .a = %a
  20. // CHECK:STDOUT: .b = %b
  21. // CHECK:STDOUT: }
  22. // CHECK:STDOUT: %a: type = bind_alias a, i32 [template = i32]
  23. // CHECK:STDOUT: %a.ref: type = name_ref a, %a [template = i32]
  24. // CHECK:STDOUT: %.loc8: i32 = int_literal 0 [template = constants.%.1]
  25. // CHECK:STDOUT: %a_test: i32 = bind_name a_test, %.loc8
  26. // CHECK:STDOUT: %b: type = bind_alias b, bool [template = bool]
  27. // CHECK:STDOUT: %b.ref: type = name_ref b, %b [template = bool]
  28. // CHECK:STDOUT: %.loc11: bool = bool_literal false [template = constants.%.2]
  29. // CHECK:STDOUT: %b_test: bool = bind_name b_test, %.loc11
  30. // CHECK:STDOUT: }
  31. // CHECK:STDOUT: