inst_kind.def 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. #define CARBON_SEM_IR_INST_KIND(Name)
  16. #endif
  17. // For each instruction kind declared here there is a matching definition in
  18. // `typed_insts.h`.
  19. CARBON_SEM_IR_INST_KIND(AccessMemberAction)
  20. CARBON_SEM_IR_INST_KIND(AccessOptionalMemberAction)
  21. CARBON_SEM_IR_INST_KIND(AcquireValue)
  22. CARBON_SEM_IR_INST_KIND(AdaptDecl)
  23. CARBON_SEM_IR_INST_KIND(AddrOf)
  24. CARBON_SEM_IR_INST_KIND(AliasBinding)
  25. CARBON_SEM_IR_INST_KIND(ArrayIndex)
  26. CARBON_SEM_IR_INST_KIND(ArrayInit)
  27. CARBON_SEM_IR_INST_KIND(ArrayType)
  28. CARBON_SEM_IR_INST_KIND(AsCompatible)
  29. CARBON_SEM_IR_INST_KIND(Assign)
  30. CARBON_SEM_IR_INST_KIND(AssociatedConstantDecl)
  31. CARBON_SEM_IR_INST_KIND(AssociatedEntity)
  32. CARBON_SEM_IR_INST_KIND(AssociatedEntityType)
  33. CARBON_SEM_IR_INST_KIND(AutoType)
  34. CARBON_SEM_IR_INST_KIND(BaseDecl)
  35. CARBON_SEM_IR_INST_KIND(BlockArg)
  36. CARBON_SEM_IR_INST_KIND(BoolLiteral)
  37. CARBON_SEM_IR_INST_KIND(BoolType)
  38. CARBON_SEM_IR_INST_KIND(BoundMethod)
  39. CARBON_SEM_IR_INST_KIND(BoundMethodType)
  40. CARBON_SEM_IR_INST_KIND(Branch)
  41. CARBON_SEM_IR_INST_KIND(BranchIf)
  42. CARBON_SEM_IR_INST_KIND(BranchWithArg)
  43. CARBON_SEM_IR_INST_KIND(Call)
  44. CARBON_SEM_IR_INST_KIND(CalleePatternMatchAction)
  45. CARBON_SEM_IR_INST_KIND(CharLiteralType)
  46. CARBON_SEM_IR_INST_KIND(CharLiteralValue)
  47. CARBON_SEM_IR_INST_KIND(ClassDecl)
  48. CARBON_SEM_IR_INST_KIND(ClassElementAccess)
  49. CARBON_SEM_IR_INST_KIND(ClassInit)
  50. CARBON_SEM_IR_INST_KIND(ClassType)
  51. CARBON_SEM_IR_INST_KIND(CompleteTypeWitness)
  52. CARBON_SEM_IR_INST_KIND(ConstType)
  53. CARBON_SEM_IR_INST_KIND(RefineFormAction)
  54. CARBON_SEM_IR_INST_KIND(ConvertToValueAction)
  55. CARBON_SEM_IR_INST_KIND(Converted)
  56. CARBON_SEM_IR_INST_KIND(CppOverloadSetType)
  57. CARBON_SEM_IR_INST_KIND(CppOverloadSetValue)
  58. CARBON_SEM_IR_INST_KIND(CppTemplateNameType)
  59. CARBON_SEM_IR_INST_KIND(CustomLayoutType)
  60. CARBON_SEM_IR_INST_KIND(CustomWitness)
  61. CARBON_SEM_IR_INST_KIND(Deref)
  62. CARBON_SEM_IR_INST_KIND(ErrorInst)
  63. CARBON_SEM_IR_INST_KIND(ExportDecl)
  64. CARBON_SEM_IR_INST_KIND(ExprPattern)
  65. CARBON_SEM_IR_INST_KIND(FacetAccessType)
  66. CARBON_SEM_IR_INST_KIND(FacetType)
  67. CARBON_SEM_IR_INST_KIND(FacetValue)
  68. CARBON_SEM_IR_INST_KIND(FieldDecl)
  69. CARBON_SEM_IR_INST_KIND(FloatLiteralType)
  70. CARBON_SEM_IR_INST_KIND(FloatLiteralValue)
  71. CARBON_SEM_IR_INST_KIND(FloatType)
  72. CARBON_SEM_IR_INST_KIND(FloatValue)
  73. CARBON_SEM_IR_INST_KIND(FormParamPatternAction)
  74. CARBON_SEM_IR_INST_KIND(FormType)
  75. CARBON_SEM_IR_INST_KIND(FunctionDecl)
  76. CARBON_SEM_IR_INST_KIND(FunctionType)
  77. CARBON_SEM_IR_INST_KIND(FunctionTypeWithSelfType)
  78. CARBON_SEM_IR_INST_KIND(GenericClassType)
  79. CARBON_SEM_IR_INST_KIND(GenericInterfaceType)
  80. CARBON_SEM_IR_INST_KIND(GenericNamedConstraintType)
  81. CARBON_SEM_IR_INST_KIND(ImplDecl)
  82. CARBON_SEM_IR_INST_KIND(ImplWitness)
  83. CARBON_SEM_IR_INST_KIND(ImplWitnessAccess)
  84. CARBON_SEM_IR_INST_KIND(ImplWitnessAccessSubstituted)
  85. CARBON_SEM_IR_INST_KIND(ImplWitnessAssociatedConstant)
  86. CARBON_SEM_IR_INST_KIND(ImplWitnessTable)
  87. CARBON_SEM_IR_INST_KIND(ImportCppDecl)
  88. CARBON_SEM_IR_INST_KIND(ImportDecl)
  89. CARBON_SEM_IR_INST_KIND(ImportRefLoaded)
  90. CARBON_SEM_IR_INST_KIND(ImportRefUnloaded)
  91. CARBON_SEM_IR_INST_KIND(InPlaceInit)
  92. CARBON_SEM_IR_INST_KIND(InitForm)
  93. CARBON_SEM_IR_INST_KIND(InlineCppDecl)
  94. CARBON_SEM_IR_INST_KIND(InstType)
  95. CARBON_SEM_IR_INST_KIND(InstValue)
  96. CARBON_SEM_IR_INST_KIND(IntLiteralType)
  97. CARBON_SEM_IR_INST_KIND(IntType)
  98. CARBON_SEM_IR_INST_KIND(IntValue)
  99. CARBON_SEM_IR_INST_KIND(InterfaceDecl)
  100. CARBON_SEM_IR_INST_KIND(InterfaceWithSelfDecl)
  101. CARBON_SEM_IR_INST_KIND(LookupImplWitness)
  102. CARBON_SEM_IR_INST_KIND(MarkInPlaceInit)
  103. CARBON_SEM_IR_INST_KIND(MaybeUnformedType)
  104. CARBON_SEM_IR_INST_KIND(NameBindingDecl)
  105. CARBON_SEM_IR_INST_KIND(NamedConstraintDecl)
  106. CARBON_SEM_IR_INST_KIND(NamedConstraintWithSelfDecl)
  107. CARBON_SEM_IR_INST_KIND(NameRef)
  108. CARBON_SEM_IR_INST_KIND(Namespace)
  109. CARBON_SEM_IR_INST_KIND(NamespaceType)
  110. CARBON_SEM_IR_INST_KIND(OutFormParamPatternAction)
  111. CARBON_SEM_IR_INST_KIND(OutParam)
  112. CARBON_SEM_IR_INST_KIND(OutParamPattern)
  113. CARBON_SEM_IR_INST_KIND(PartialType)
  114. CARBON_SEM_IR_INST_KIND(PatternType)
  115. CARBON_SEM_IR_INST_KIND(PointerType)
  116. CARBON_SEM_IR_INST_KIND(RefBinding)
  117. CARBON_SEM_IR_INST_KIND(RefBindingPattern)
  118. CARBON_SEM_IR_INST_KIND(RefForm)
  119. CARBON_SEM_IR_INST_KIND(RefParam)
  120. CARBON_SEM_IR_INST_KIND(RefParamPattern)
  121. CARBON_SEM_IR_INST_KIND(RefReturn)
  122. CARBON_SEM_IR_INST_KIND(RefReturnPattern)
  123. CARBON_SEM_IR_INST_KIND(RefTagExpr)
  124. CARBON_SEM_IR_INST_KIND(RefineTypeAction)
  125. CARBON_SEM_IR_INST_KIND(RequireCompleteType)
  126. CARBON_SEM_IR_INST_KIND(RequireImplsDecl)
  127. CARBON_SEM_IR_INST_KIND(RequireSpecificDefinition)
  128. CARBON_SEM_IR_INST_KIND(RequireSpecificDefinitionType)
  129. CARBON_SEM_IR_INST_KIND(RequirementBaseFacetType)
  130. CARBON_SEM_IR_INST_KIND(RequirementEquivalent)
  131. CARBON_SEM_IR_INST_KIND(RequirementImpls)
  132. CARBON_SEM_IR_INST_KIND(RequirementRewrite)
  133. CARBON_SEM_IR_INST_KIND(Return)
  134. CARBON_SEM_IR_INST_KIND(ReturnExpr)
  135. CARBON_SEM_IR_INST_KIND(ReturnSlot)
  136. CARBON_SEM_IR_INST_KIND(ReturnSlotPattern)
  137. CARBON_SEM_IR_INST_KIND(SpecificConstant)
  138. CARBON_SEM_IR_INST_KIND(SpecificFunction)
  139. CARBON_SEM_IR_INST_KIND(SpecificFunctionType)
  140. CARBON_SEM_IR_INST_KIND(SpecificImplFunction)
  141. CARBON_SEM_IR_INST_KIND(SpliceBlock)
  142. CARBON_SEM_IR_INST_KIND(SpliceInst)
  143. CARBON_SEM_IR_INST_KIND(StringLiteral)
  144. CARBON_SEM_IR_INST_KIND(StructAccess)
  145. CARBON_SEM_IR_INST_KIND(StructInit)
  146. CARBON_SEM_IR_INST_KIND(StructLiteral)
  147. CARBON_SEM_IR_INST_KIND(StructType)
  148. CARBON_SEM_IR_INST_KIND(StructValue)
  149. CARBON_SEM_IR_INST_KIND(SymbolicBinding)
  150. CARBON_SEM_IR_INST_KIND(SymbolicBindingPattern)
  151. CARBON_SEM_IR_INST_KIND(Temporary)
  152. CARBON_SEM_IR_INST_KIND(TemporaryStorage)
  153. CARBON_SEM_IR_INST_KIND(TupleAccess)
  154. CARBON_SEM_IR_INST_KIND(TupleInit)
  155. CARBON_SEM_IR_INST_KIND(TupleLiteral)
  156. CARBON_SEM_IR_INST_KIND(TuplePattern)
  157. CARBON_SEM_IR_INST_KIND(TupleType)
  158. CARBON_SEM_IR_INST_KIND(TupleValue)
  159. CARBON_SEM_IR_INST_KIND(TypeComponentOf)
  160. CARBON_SEM_IR_INST_KIND(TypeLiteral)
  161. CARBON_SEM_IR_INST_KIND(TypeOfInst)
  162. CARBON_SEM_IR_INST_KIND(TypeType)
  163. CARBON_SEM_IR_INST_KIND(UnaryOperatorNot)
  164. CARBON_SEM_IR_INST_KIND(UnboundElementType)
  165. CARBON_SEM_IR_INST_KIND(UninitializedValue)
  166. CARBON_SEM_IR_INST_KIND(UpdateInit)
  167. CARBON_SEM_IR_INST_KIND(ValueAsRef)
  168. CARBON_SEM_IR_INST_KIND(ValueBinding)
  169. CARBON_SEM_IR_INST_KIND(ValueBindingPattern)
  170. CARBON_SEM_IR_INST_KIND(ValueForm)
  171. CARBON_SEM_IR_INST_KIND(ValueOfInitializer)
  172. CARBON_SEM_IR_INST_KIND(ValueParam)
  173. CARBON_SEM_IR_INST_KIND(ValueParamPattern)
  174. CARBON_SEM_IR_INST_KIND(ValueReturn)
  175. CARBON_SEM_IR_INST_KIND(ValueReturnPattern)
  176. CARBON_SEM_IR_INST_KIND(VarParamPattern)
  177. CARBON_SEM_IR_INST_KIND(VarPattern)
  178. CARBON_SEM_IR_INST_KIND(VarStorage)
  179. CARBON_SEM_IR_INST_KIND(VtableDecl)
  180. CARBON_SEM_IR_INST_KIND(VtableType)
  181. CARBON_SEM_IR_INST_KIND(VtablePtr)
  182. CARBON_SEM_IR_INST_KIND(WhereExpr)
  183. CARBON_SEM_IR_INST_KIND(WitnessType)
  184. CARBON_SEM_IR_INST_KIND(WrapperBindingPattern)
  185. #undef CARBON_SEM_IR_INST_KIND
  186. #undef CARBON_SEM_IR_BUILTIN_INST_KIND