builtins.carbon 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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: object_layout:
  40. // CHECK:STDOUT: size: 0
  41. // CHECK:STDOUT: alignment: 1
  42. // CHECK:STDOUT: 'type(inst(FormType))':
  43. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(FormType))}
  44. // CHECK:STDOUT: object_layout:
  45. // CHECK:STDOUT: size: 0
  46. // CHECK:STDOUT: alignment: 1
  47. // CHECK:STDOUT: 'type(Error)':
  48. // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)}
  49. // CHECK:STDOUT: object_layout:
  50. // CHECK:STDOUT: size: 0
  51. // CHECK:STDOUT: alignment: 1
  52. // CHECK:STDOUT: 'type(inst(InstType))':
  53. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(InstType))}
  54. // CHECK:STDOUT: object_layout:
  55. // CHECK:STDOUT: size: 0
  56. // CHECK:STDOUT: alignment: 1
  57. // CHECK:STDOUT: 'type(inst(NamespaceType))':
  58. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))}
  59. // CHECK:STDOUT: object_layout:
  60. // CHECK:STDOUT: size: 0
  61. // CHECK:STDOUT: alignment: 1
  62. // CHECK:STDOUT: facet_types: {}
  63. // CHECK:STDOUT: insts:
  64. // CHECK:STDOUT: 'inst(TypeType)': {kind: TypeType, type: type(TypeType)}
  65. // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)}
  66. // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)}
  67. // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)}
  68. // CHECK:STDOUT: 'inst(CharLiteralType)': {kind: CharLiteralType, type: type(TypeType)}
  69. // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)}
  70. // CHECK:STDOUT: 'inst(FloatLiteralType)': {kind: FloatLiteralType, type: type(TypeType)}
  71. // CHECK:STDOUT: 'inst(FormType)': {kind: FormType, type: type(TypeType)}
  72. // CHECK:STDOUT: 'inst(InstType)': {kind: InstType, type: type(TypeType)}
  73. // CHECK:STDOUT: 'inst(IntLiteralType)': {kind: IntLiteralType, type: type(TypeType)}
  74. // CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
  75. // CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': {kind: RequireSpecificDefinitionType, type: type(TypeType)}
  76. // CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
  77. // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
  78. // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
  79. // CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
  80. // CHECK:STDOUT: constant_values:
  81. // CHECK:STDOUT: values:
  82. // CHECK:STDOUT: 'inst(TypeType)': concrete_constant(inst(TypeType))
  83. // CHECK:STDOUT: 'inst(AutoType)': concrete_constant(inst(AutoType))
  84. // CHECK:STDOUT: 'inst(BoolType)': concrete_constant(inst(BoolType))
  85. // CHECK:STDOUT: 'inst(BoundMethodType)': concrete_constant(inst(BoundMethodType))
  86. // CHECK:STDOUT: 'inst(CharLiteralType)': concrete_constant(inst(CharLiteralType))
  87. // CHECK:STDOUT: 'inst(ErrorInst)': concrete_constant(inst(ErrorInst))
  88. // CHECK:STDOUT: 'inst(FloatLiteralType)': concrete_constant(inst(FloatLiteralType))
  89. // CHECK:STDOUT: 'inst(FormType)': concrete_constant(inst(FormType))
  90. // CHECK:STDOUT: 'inst(InstType)': concrete_constant(inst(InstType))
  91. // CHECK:STDOUT: 'inst(IntLiteralType)': concrete_constant(inst(IntLiteralType))
  92. // CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
  93. // CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': concrete_constant(inst(RequireSpecificDefinitionType))
  94. // CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
  95. // CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
  96. // CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
  97. // CHECK:STDOUT: instF: concrete_constant(instF)
  98. // CHECK:STDOUT: symbolic_constants: {}
  99. // CHECK:STDOUT: inst_blocks:
  100. // CHECK:STDOUT: inst_block_empty: {}
  101. // CHECK:STDOUT: exports: {}
  102. // CHECK:STDOUT: generated: {}
  103. // CHECK:STDOUT: imports: {}
  104. // CHECK:STDOUT: global_init: {}
  105. // CHECK:STDOUT: inst_block50000005:
  106. // CHECK:STDOUT: 0: instF
  107. // CHECK:STDOUT: value_stores:
  108. // CHECK:STDOUT: shared_values:
  109. // CHECK:STDOUT: ints: {}
  110. // CHECK:STDOUT: reals: {}
  111. // CHECK:STDOUT: floats: {}
  112. // CHECK:STDOUT: identifiers: {}
  113. // CHECK:STDOUT: strings: {}
  114. // CHECK:STDOUT: ...