inst_kind.def 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. // This is an X-macro header. It does not use `#include` guards, and instead is
  6. // designed to be `#include`ed after the x-macro is defined in order for its
  7. // inclusion to expand to the desired output. Macro definitions are cleaned up
  8. // at the end of this file.
  9. //
  10. // This macro should be defined before including this header:
  11. // - CARBON_SEM_IR_INST_KIND(Name)
  12. // Invoked for each kind of semantic instruction.
  13. #ifndef CARBON_SEM_IR_INST_KIND
  14. #error "Must define the x-macro to use this file."
  15. #endif
  16. // For each instruction kind declared here there is a matching definition in
  17. // `typed_insts.h`.
  18. CARBON_SEM_IR_INST_KIND(AdaptDecl)
  19. CARBON_SEM_IR_INST_KIND(AddrOf)
  20. CARBON_SEM_IR_INST_KIND(AddrPattern)
  21. CARBON_SEM_IR_INST_KIND(ArrayIndex)
  22. CARBON_SEM_IR_INST_KIND(ArrayInit)
  23. CARBON_SEM_IR_INST_KIND(ArrayType)
  24. CARBON_SEM_IR_INST_KIND(AsCompatible)
  25. CARBON_SEM_IR_INST_KIND(Assign)
  26. CARBON_SEM_IR_INST_KIND(AssociatedConstantDecl)
  27. CARBON_SEM_IR_INST_KIND(AssociatedEntity)
  28. CARBON_SEM_IR_INST_KIND(AssociatedEntityType)
  29. CARBON_SEM_IR_INST_KIND(AutoType)
  30. CARBON_SEM_IR_INST_KIND(BaseDecl)
  31. CARBON_SEM_IR_INST_KIND(BindAlias)
  32. CARBON_SEM_IR_INST_KIND(BindName)
  33. CARBON_SEM_IR_INST_KIND(BindSymbolicName)
  34. CARBON_SEM_IR_INST_KIND(BindValue)
  35. CARBON_SEM_IR_INST_KIND(BindingPattern)
  36. CARBON_SEM_IR_INST_KIND(BlockArg)
  37. CARBON_SEM_IR_INST_KIND(BoolLiteral)
  38. CARBON_SEM_IR_INST_KIND(BoolType)
  39. CARBON_SEM_IR_INST_KIND(BoundMethod)
  40. CARBON_SEM_IR_INST_KIND(BoundMethodType)
  41. CARBON_SEM_IR_INST_KIND(Branch)
  42. CARBON_SEM_IR_INST_KIND(BranchIf)
  43. CARBON_SEM_IR_INST_KIND(BranchWithArg)
  44. CARBON_SEM_IR_INST_KIND(Call)
  45. CARBON_SEM_IR_INST_KIND(ClassDecl)
  46. CARBON_SEM_IR_INST_KIND(ClassElementAccess)
  47. CARBON_SEM_IR_INST_KIND(ClassInit)
  48. CARBON_SEM_IR_INST_KIND(ClassType)
  49. CARBON_SEM_IR_INST_KIND(CompleteTypeWitness)
  50. CARBON_SEM_IR_INST_KIND(ConstType)
  51. CARBON_SEM_IR_INST_KIND(Converted)
  52. CARBON_SEM_IR_INST_KIND(Deref)
  53. CARBON_SEM_IR_INST_KIND(ErrorInst)
  54. CARBON_SEM_IR_INST_KIND(ExportDecl)
  55. CARBON_SEM_IR_INST_KIND(FacetAccessType)
  56. CARBON_SEM_IR_INST_KIND(FacetAccessWitness)
  57. CARBON_SEM_IR_INST_KIND(FacetType)
  58. CARBON_SEM_IR_INST_KIND(FacetValue)
  59. CARBON_SEM_IR_INST_KIND(FieldDecl)
  60. CARBON_SEM_IR_INST_KIND(FloatLiteral)
  61. CARBON_SEM_IR_INST_KIND(FloatType)
  62. CARBON_SEM_IR_INST_KIND(FunctionDecl)
  63. CARBON_SEM_IR_INST_KIND(FunctionType)
  64. CARBON_SEM_IR_INST_KIND(FunctionTypeWithSelfType)
  65. CARBON_SEM_IR_INST_KIND(GenericClassType)
  66. CARBON_SEM_IR_INST_KIND(GenericInterfaceType)
  67. CARBON_SEM_IR_INST_KIND(ImplDecl)
  68. CARBON_SEM_IR_INST_KIND(ImplWitness)
  69. CARBON_SEM_IR_INST_KIND(ImplWitnessAccess)
  70. CARBON_SEM_IR_INST_KIND(ImportDecl)
  71. CARBON_SEM_IR_INST_KIND(ImportRefLoaded)
  72. CARBON_SEM_IR_INST_KIND(ImportRefUnloaded)
  73. CARBON_SEM_IR_INST_KIND(InitializeFrom)
  74. CARBON_SEM_IR_INST_KIND(IntLiteralType)
  75. CARBON_SEM_IR_INST_KIND(IntType)
  76. CARBON_SEM_IR_INST_KIND(IntValue)
  77. CARBON_SEM_IR_INST_KIND(InterfaceDecl)
  78. CARBON_SEM_IR_INST_KIND(LegacyFloatType)
  79. CARBON_SEM_IR_INST_KIND(NameBindingDecl)
  80. CARBON_SEM_IR_INST_KIND(NameRef)
  81. CARBON_SEM_IR_INST_KIND(Namespace)
  82. CARBON_SEM_IR_INST_KIND(NamespaceType)
  83. CARBON_SEM_IR_INST_KIND(OutParam)
  84. CARBON_SEM_IR_INST_KIND(OutParamPattern)
  85. CARBON_SEM_IR_INST_KIND(PointerType)
  86. CARBON_SEM_IR_INST_KIND(RequireCompleteType)
  87. CARBON_SEM_IR_INST_KIND(RequirementEquivalent)
  88. CARBON_SEM_IR_INST_KIND(RequirementImpls)
  89. CARBON_SEM_IR_INST_KIND(RequirementRewrite)
  90. CARBON_SEM_IR_INST_KIND(Return)
  91. CARBON_SEM_IR_INST_KIND(ReturnExpr)
  92. CARBON_SEM_IR_INST_KIND(ReturnSlot)
  93. CARBON_SEM_IR_INST_KIND(ReturnSlotPattern)
  94. CARBON_SEM_IR_INST_KIND(SpecificConstant)
  95. CARBON_SEM_IR_INST_KIND(SpecificFunction)
  96. CARBON_SEM_IR_INST_KIND(SpecificFunctionType)
  97. CARBON_SEM_IR_INST_KIND(SpliceBlock)
  98. CARBON_SEM_IR_INST_KIND(StringLiteral)
  99. CARBON_SEM_IR_INST_KIND(StringType)
  100. CARBON_SEM_IR_INST_KIND(StructAccess)
  101. CARBON_SEM_IR_INST_KIND(StructInit)
  102. CARBON_SEM_IR_INST_KIND(StructLiteral)
  103. CARBON_SEM_IR_INST_KIND(StructType)
  104. CARBON_SEM_IR_INST_KIND(StructValue)
  105. CARBON_SEM_IR_INST_KIND(SymbolicBindingPattern)
  106. CARBON_SEM_IR_INST_KIND(Temporary)
  107. CARBON_SEM_IR_INST_KIND(TemporaryStorage)
  108. CARBON_SEM_IR_INST_KIND(TupleAccess)
  109. CARBON_SEM_IR_INST_KIND(TupleInit)
  110. CARBON_SEM_IR_INST_KIND(TupleLiteral)
  111. CARBON_SEM_IR_INST_KIND(TupleType)
  112. CARBON_SEM_IR_INST_KIND(TupleValue)
  113. CARBON_SEM_IR_INST_KIND(TypeType)
  114. CARBON_SEM_IR_INST_KIND(UnaryOperatorNot)
  115. CARBON_SEM_IR_INST_KIND(UnboundElementType)
  116. CARBON_SEM_IR_INST_KIND(ValueAsRef)
  117. CARBON_SEM_IR_INST_KIND(ValueOfInitializer)
  118. CARBON_SEM_IR_INST_KIND(ValueParam)
  119. CARBON_SEM_IR_INST_KIND(ValueParamPattern)
  120. CARBON_SEM_IR_INST_KIND(VarPattern)
  121. CARBON_SEM_IR_INST_KIND(VarStorage)
  122. CARBON_SEM_IR_INST_KIND(VtableType)
  123. CARBON_SEM_IR_INST_KIND(VtablePtr)
  124. CARBON_SEM_IR_INST_KIND(Vtable)
  125. CARBON_SEM_IR_INST_KIND(WhereExpr)
  126. CARBON_SEM_IR_INST_KIND(WitnessType)
  127. #undef CARBON_SEM_IR_INST_KIND
  128. #undef CARBON_SEM_IR_BUILTIN_INST_KIND