builtin_insts.carbon 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. // ARGS: --include-diagnostic-kind compile --no-prelude-import --phase=check --dump-raw-sem-ir --builtin-sem-ir %s
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/builtin_insts.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/builtin_insts.carbon
  12. // CHECK:STDOUT: ---
  13. // CHECK:STDOUT: filename: builtin_insts.carbon
  14. // CHECK:STDOUT: sem_ir:
  15. // CHECK:STDOUT: import_irs:
  16. // CHECK:STDOUT: ir0: {decl_id: inst<none>, is_export: false}
  17. // CHECK:STDOUT: import_ir_insts: {}
  18. // CHECK:STDOUT: name_scopes:
  19. // CHECK:STDOUT: name_scope0: {inst: inst12, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
  20. // CHECK:STDOUT: entity_names: {}
  21. // CHECK:STDOUT: functions: {}
  22. // CHECK:STDOUT: classes: {}
  23. // CHECK:STDOUT: generics: {}
  24. // CHECK:STDOUT: specifics: {}
  25. // CHECK:STDOUT: struct_type_fields:
  26. // CHECK:STDOUT: struct_type_fields0: {}
  27. // CHECK:STDOUT: types:
  28. // CHECK:STDOUT: 'type(TypeType)': {kind: copy, type: type(TypeType)}
  29. // CHECK:STDOUT: 'type(Error)': {kind: copy, type: type(Error)}
  30. // CHECK:STDOUT: 'type(inst(NamespaceType))': {kind: copy, type: type(inst(NamespaceType))}
  31. // CHECK:STDOUT: type_blocks:
  32. // CHECK:STDOUT: type_block0: {}
  33. // CHECK:STDOUT: insts:
  34. // CHECK:STDOUT: 'inst(TypeType)': {kind: TypeType, type: type(TypeType)}
  35. // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)}
  36. // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)}
  37. // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)}
  38. // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)}
  39. // CHECK:STDOUT: 'inst(IntLiteralType)': {kind: IntLiteralType, type: type(TypeType)}
  40. // CHECK:STDOUT: 'inst(LegacyFloatType)': {kind: LegacyFloatType, type: type(TypeType)}
  41. // CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
  42. // CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
  43. // CHECK:STDOUT: 'inst(StringType)': {kind: StringType, type: type(TypeType)}
  44. // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
  45. // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
  46. // CHECK:STDOUT: inst12: {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
  47. // CHECK:STDOUT: constant_values:
  48. // CHECK:STDOUT: 'inst(TypeType)': template_constant(inst(TypeType))
  49. // CHECK:STDOUT: 'inst(AutoType)': template_constant(inst(AutoType))
  50. // CHECK:STDOUT: 'inst(BoolType)': template_constant(inst(BoolType))
  51. // CHECK:STDOUT: 'inst(BoundMethodType)': template_constant(inst(BoundMethodType))
  52. // CHECK:STDOUT: 'inst(ErrorInst)': template_constant(inst(ErrorInst))
  53. // CHECK:STDOUT: 'inst(IntLiteralType)': template_constant(inst(IntLiteralType))
  54. // CHECK:STDOUT: 'inst(LegacyFloatType)': template_constant(inst(LegacyFloatType))
  55. // CHECK:STDOUT: 'inst(NamespaceType)': template_constant(inst(NamespaceType))
  56. // CHECK:STDOUT: 'inst(SpecificFunctionType)': template_constant(inst(SpecificFunctionType))
  57. // CHECK:STDOUT: 'inst(StringType)': template_constant(inst(StringType))
  58. // CHECK:STDOUT: 'inst(VtableType)': template_constant(inst(VtableType))
  59. // CHECK:STDOUT: 'inst(WitnessType)': template_constant(inst(WitnessType))
  60. // CHECK:STDOUT: inst12: template_constant(inst12)
  61. // CHECK:STDOUT: symbolic_constants: {}
  62. // CHECK:STDOUT: inst_blocks:
  63. // CHECK:STDOUT: inst_block_empty: {}
  64. // CHECK:STDOUT: exports: {}
  65. // CHECK:STDOUT: import_refs: {}
  66. // CHECK:STDOUT: global_init: {}
  67. // CHECK:STDOUT: inst_block4:
  68. // CHECK:STDOUT: 0: inst12
  69. // CHECK:STDOUT: ...