builtins.carbon 5.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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: names: {}
  17. // CHECK:STDOUT: import_irs:
  18. // CHECK:STDOUT: 'import_ir(ApiForImpl)': {decl_id: inst<none>, is_export: false}
  19. // CHECK:STDOUT: 'import_ir(Cpp)': {decl_id: inst<none>, is_export: false}
  20. // CHECK:STDOUT: import_ir_insts: {}
  21. // CHECK:STDOUT: clang_decls: {}
  22. // CHECK:STDOUT: name_scopes:
  23. // CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
  24. // CHECK:STDOUT: entity_names: {}
  25. // CHECK:STDOUT: cpp_global_vars: {}
  26. // CHECK:STDOUT: functions: {}
  27. // CHECK:STDOUT: classes: {}
  28. // CHECK:STDOUT: interfaces: {}
  29. // CHECK:STDOUT: associated_constants: {}
  30. // CHECK:STDOUT: impls: {}
  31. // CHECK:STDOUT: generics: {}
  32. // CHECK:STDOUT: specifics: {}
  33. // CHECK:STDOUT: specific_interfaces: {}
  34. // CHECK:STDOUT: struct_type_fields:
  35. // CHECK:STDOUT: struct_type_fields_empty: {}
  36. // CHECK:STDOUT: types:
  37. // CHECK:STDOUT: 'type(TypeType)':
  38. // CHECK:STDOUT: value_repr: {kind: copy, type: type(TypeType)}
  39. // CHECK:STDOUT: 'type(inst(FormType))':
  40. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(FormType))}
  41. // CHECK:STDOUT: 'type(Error)':
  42. // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)}
  43. // CHECK:STDOUT: 'type(inst(NamespaceType))':
  44. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))}
  45. // CHECK:STDOUT: facet_types: {}
  46. // CHECK:STDOUT: insts:
  47. // CHECK:STDOUT: 'inst(TypeType)': {kind: TypeType, type: type(TypeType)}
  48. // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)}
  49. // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)}
  50. // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)}
  51. // CHECK:STDOUT: 'inst(CharLiteralType)': {kind: CharLiteralType, type: type(TypeType)}
  52. // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)}
  53. // CHECK:STDOUT: 'inst(FloatLiteralType)': {kind: FloatLiteralType, type: type(TypeType)}
  54. // CHECK:STDOUT: 'inst(FormType)': {kind: FormType, type: type(TypeType)}
  55. // CHECK:STDOUT: 'inst(InstType)': {kind: InstType, type: type(TypeType)}
  56. // CHECK:STDOUT: 'inst(IntLiteralType)': {kind: IntLiteralType, type: type(TypeType)}
  57. // CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
  58. // CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': {kind: RequireSpecificDefinitionType, type: type(TypeType)}
  59. // CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
  60. // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
  61. // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
  62. // CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
  63. // CHECK:STDOUT: constant_values:
  64. // CHECK:STDOUT: values:
  65. // CHECK:STDOUT: 'inst(TypeType)': concrete_constant(inst(TypeType))
  66. // CHECK:STDOUT: 'inst(AutoType)': concrete_constant(inst(AutoType))
  67. // CHECK:STDOUT: 'inst(BoolType)': concrete_constant(inst(BoolType))
  68. // CHECK:STDOUT: 'inst(BoundMethodType)': concrete_constant(inst(BoundMethodType))
  69. // CHECK:STDOUT: 'inst(CharLiteralType)': concrete_constant(inst(CharLiteralType))
  70. // CHECK:STDOUT: 'inst(ErrorInst)': concrete_constant(inst(ErrorInst))
  71. // CHECK:STDOUT: 'inst(FloatLiteralType)': concrete_constant(inst(FloatLiteralType))
  72. // CHECK:STDOUT: 'inst(FormType)': concrete_constant(inst(FormType))
  73. // CHECK:STDOUT: 'inst(InstType)': concrete_constant(inst(InstType))
  74. // CHECK:STDOUT: 'inst(IntLiteralType)': concrete_constant(inst(IntLiteralType))
  75. // CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
  76. // CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': concrete_constant(inst(RequireSpecificDefinitionType))
  77. // CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
  78. // CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
  79. // CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
  80. // CHECK:STDOUT: instF: concrete_constant(instF)
  81. // CHECK:STDOUT: symbolic_constants: {}
  82. // CHECK:STDOUT: inst_blocks:
  83. // CHECK:STDOUT: inst_block_empty: {}
  84. // CHECK:STDOUT: exports: {}
  85. // CHECK:STDOUT: imports: {}
  86. // CHECK:STDOUT: global_init: {}
  87. // CHECK:STDOUT: inst_block60000004:
  88. // CHECK:STDOUT: 0: instF
  89. // CHECK:STDOUT: value_stores:
  90. // CHECK:STDOUT: shared_values:
  91. // CHECK:STDOUT: ints: {}
  92. // CHECK:STDOUT: reals: {}
  93. // CHECK:STDOUT: floats: {}
  94. // CHECK:STDOUT: identifiers: {}
  95. // CHECK:STDOUT: strings: {}
  96. // CHECK:STDOUT: ...