builtins.carbon 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
  6. // EXTRA-ARGS: --dump-raw-sem-ir --builtin-sem-ir
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon
  13. // CHECK:STDOUT: ---
  14. // CHECK:STDOUT: filename: builtins.carbon
  15. // CHECK:STDOUT: sem_ir:
  16. // CHECK:STDOUT: import_irs:
  17. // CHECK:STDOUT: ir0: {decl_id: inst<none>, is_export: false}
  18. // CHECK:STDOUT: ir1: {decl_id: inst<none>, is_export: false}
  19. // CHECK:STDOUT: import_ir_insts: {}
  20. // CHECK:STDOUT: clang_decls: {}
  21. // CHECK:STDOUT: name_scopes:
  22. // CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
  23. // CHECK:STDOUT: entity_names: {}
  24. // CHECK:STDOUT: functions: {}
  25. // CHECK:STDOUT: classes: {}
  26. // CHECK:STDOUT: generics: {}
  27. // CHECK:STDOUT: specifics: {}
  28. // CHECK:STDOUT: struct_type_fields:
  29. // CHECK:STDOUT: struct_type_fields0: {}
  30. // CHECK:STDOUT: types:
  31. // CHECK:STDOUT: 'type(TypeType)':
  32. // CHECK:STDOUT: value_repr: {kind: copy, type: type(TypeType)}
  33. // CHECK:STDOUT: 'type(Error)':
  34. // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)}
  35. // CHECK:STDOUT: 'type(inst(NamespaceType))':
  36. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))}
  37. // CHECK:STDOUT: insts:
  38. // CHECK:STDOUT: 'inst(TypeType)': {kind: TypeType, type: type(TypeType)}
  39. // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)}
  40. // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)}
  41. // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)}
  42. // CHECK:STDOUT: 'inst(CharLiteralType)': {kind: CharLiteralType, type: type(TypeType)}
  43. // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)}
  44. // CHECK:STDOUT: 'inst(FloatLiteralType)': {kind: FloatLiteralType, type: type(TypeType)}
  45. // CHECK:STDOUT: 'inst(ImplWitnessTablePlaceholder)': {kind: ImplWitnessTablePlaceholder, type: type(TypeType)}
  46. // CHECK:STDOUT: 'inst(InstType)': {kind: InstType, type: type(TypeType)}
  47. // CHECK:STDOUT: 'inst(IntLiteralType)': {kind: IntLiteralType, type: type(TypeType)}
  48. // CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
  49. // CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
  50. // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
  51. // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
  52. // CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
  53. // CHECK:STDOUT: constant_values:
  54. // CHECK:STDOUT: values:
  55. // CHECK:STDOUT: 'inst(TypeType)': concrete_constant(inst(TypeType))
  56. // CHECK:STDOUT: 'inst(AutoType)': concrete_constant(inst(AutoType))
  57. // CHECK:STDOUT: 'inst(BoolType)': concrete_constant(inst(BoolType))
  58. // CHECK:STDOUT: 'inst(BoundMethodType)': concrete_constant(inst(BoundMethodType))
  59. // CHECK:STDOUT: 'inst(CharLiteralType)': concrete_constant(inst(CharLiteralType))
  60. // CHECK:STDOUT: 'inst(ErrorInst)': concrete_constant(inst(ErrorInst))
  61. // CHECK:STDOUT: 'inst(FloatLiteralType)': concrete_constant(inst(FloatLiteralType))
  62. // CHECK:STDOUT: 'inst(ImplWitnessTablePlaceholder)': concrete_constant(inst(ImplWitnessTablePlaceholder))
  63. // CHECK:STDOUT: 'inst(InstType)': concrete_constant(inst(InstType))
  64. // CHECK:STDOUT: 'inst(IntLiteralType)': concrete_constant(inst(IntLiteralType))
  65. // CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
  66. // CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
  67. // CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
  68. // CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
  69. // CHECK:STDOUT: inst14: concrete_constant(inst14)
  70. // CHECK:STDOUT: symbolic_constants: {}
  71. // CHECK:STDOUT: inst_blocks:
  72. // CHECK:STDOUT: inst_block_empty: {}
  73. // CHECK:STDOUT: exports: {}
  74. // CHECK:STDOUT: imports: {}
  75. // CHECK:STDOUT: global_init: {}
  76. // CHECK:STDOUT: inst_block4:
  77. // CHECK:STDOUT: 0: inst14
  78. // CHECK:STDOUT: ...