inst_kind.def 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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(CharLiteralType)
  45. CARBON_SEM_IR_INST_KIND(CharLiteralValue)
  46. CARBON_SEM_IR_INST_KIND(ClassDecl)
  47. CARBON_SEM_IR_INST_KIND(ClassElementAccess)
  48. CARBON_SEM_IR_INST_KIND(ClassInit)
  49. CARBON_SEM_IR_INST_KIND(ClassType)
  50. CARBON_SEM_IR_INST_KIND(CompleteTypeWitness)
  51. CARBON_SEM_IR_INST_KIND(ConstType)
  52. CARBON_SEM_IR_INST_KIND(ConvertToValueAction)
  53. CARBON_SEM_IR_INST_KIND(Converted)
  54. CARBON_SEM_IR_INST_KIND(CppOverloadSetType)
  55. CARBON_SEM_IR_INST_KIND(CppOverloadSetValue)
  56. CARBON_SEM_IR_INST_KIND(CppTemplateNameType)
  57. CARBON_SEM_IR_INST_KIND(CustomLayoutType)
  58. CARBON_SEM_IR_INST_KIND(CustomWitness)
  59. CARBON_SEM_IR_INST_KIND(Deref)
  60. CARBON_SEM_IR_INST_KIND(ErrorInst)
  61. CARBON_SEM_IR_INST_KIND(ExportDecl)
  62. CARBON_SEM_IR_INST_KIND(FacetAccessType)
  63. CARBON_SEM_IR_INST_KIND(FacetType)
  64. CARBON_SEM_IR_INST_KIND(FacetValue)
  65. CARBON_SEM_IR_INST_KIND(FieldDecl)
  66. CARBON_SEM_IR_INST_KIND(FloatLiteralType)
  67. CARBON_SEM_IR_INST_KIND(FloatLiteralValue)
  68. CARBON_SEM_IR_INST_KIND(FloatType)
  69. CARBON_SEM_IR_INST_KIND(FloatValue)
  70. CARBON_SEM_IR_INST_KIND(FormType)
  71. CARBON_SEM_IR_INST_KIND(FunctionDecl)
  72. CARBON_SEM_IR_INST_KIND(FunctionType)
  73. CARBON_SEM_IR_INST_KIND(FunctionTypeWithSelfType)
  74. CARBON_SEM_IR_INST_KIND(GenericClassType)
  75. CARBON_SEM_IR_INST_KIND(GenericInterfaceType)
  76. CARBON_SEM_IR_INST_KIND(GenericNamedConstraintType)
  77. CARBON_SEM_IR_INST_KIND(ImplDecl)
  78. CARBON_SEM_IR_INST_KIND(ImplWitness)
  79. CARBON_SEM_IR_INST_KIND(ImplWitnessAccess)
  80. CARBON_SEM_IR_INST_KIND(ImplWitnessAccessSubstituted)
  81. CARBON_SEM_IR_INST_KIND(ImplWitnessAssociatedConstant)
  82. CARBON_SEM_IR_INST_KIND(ImplWitnessTable)
  83. CARBON_SEM_IR_INST_KIND(ImportCppDecl)
  84. CARBON_SEM_IR_INST_KIND(ImportDecl)
  85. CARBON_SEM_IR_INST_KIND(ImportRefLoaded)
  86. CARBON_SEM_IR_INST_KIND(ImportRefUnloaded)
  87. CARBON_SEM_IR_INST_KIND(InitForm)
  88. CARBON_SEM_IR_INST_KIND(InPlaceInit)
  89. CARBON_SEM_IR_INST_KIND(InstType)
  90. CARBON_SEM_IR_INST_KIND(InstValue)
  91. CARBON_SEM_IR_INST_KIND(IntLiteralType)
  92. CARBON_SEM_IR_INST_KIND(IntType)
  93. CARBON_SEM_IR_INST_KIND(IntValue)
  94. CARBON_SEM_IR_INST_KIND(InterfaceDecl)
  95. CARBON_SEM_IR_INST_KIND(LookupImplWitness)
  96. CARBON_SEM_IR_INST_KIND(MarkInPlaceInit)
  97. CARBON_SEM_IR_INST_KIND(MaybeUnformedType)
  98. CARBON_SEM_IR_INST_KIND(NameBindingDecl)
  99. CARBON_SEM_IR_INST_KIND(NamedConstraintDecl)
  100. CARBON_SEM_IR_INST_KIND(NameRef)
  101. CARBON_SEM_IR_INST_KIND(Namespace)
  102. CARBON_SEM_IR_INST_KIND(NamespaceType)
  103. CARBON_SEM_IR_INST_KIND(OutParam)
  104. CARBON_SEM_IR_INST_KIND(OutParamPattern)
  105. CARBON_SEM_IR_INST_KIND(PartialType)
  106. CARBON_SEM_IR_INST_KIND(PatternType)
  107. CARBON_SEM_IR_INST_KIND(PointerType)
  108. CARBON_SEM_IR_INST_KIND(RefBinding)
  109. CARBON_SEM_IR_INST_KIND(RefBindingPattern)
  110. CARBON_SEM_IR_INST_KIND(RefForm)
  111. CARBON_SEM_IR_INST_KIND(RefParam)
  112. CARBON_SEM_IR_INST_KIND(RefParamPattern)
  113. CARBON_SEM_IR_INST_KIND(RefTagExpr)
  114. CARBON_SEM_IR_INST_KIND(RefineTypeAction)
  115. CARBON_SEM_IR_INST_KIND(RequireCompleteType)
  116. CARBON_SEM_IR_INST_KIND(RequireImplsDecl)
  117. CARBON_SEM_IR_INST_KIND(RequireSpecificDefinition)
  118. CARBON_SEM_IR_INST_KIND(RequireSpecificDefinitionType)
  119. CARBON_SEM_IR_INST_KIND(RequirementBaseFacetType)
  120. CARBON_SEM_IR_INST_KIND(RequirementEquivalent)
  121. CARBON_SEM_IR_INST_KIND(RequirementImpls)
  122. CARBON_SEM_IR_INST_KIND(RequirementRewrite)
  123. CARBON_SEM_IR_INST_KIND(Return)
  124. CARBON_SEM_IR_INST_KIND(ReturnExpr)
  125. CARBON_SEM_IR_INST_KIND(ReturnSlot)
  126. CARBON_SEM_IR_INST_KIND(ReturnSlotPattern)
  127. CARBON_SEM_IR_INST_KIND(SpecificConstant)
  128. CARBON_SEM_IR_INST_KIND(SpecificFunction)
  129. CARBON_SEM_IR_INST_KIND(SpecificFunctionType)
  130. CARBON_SEM_IR_INST_KIND(SpecificImplFunction)
  131. CARBON_SEM_IR_INST_KIND(SpliceBlock)
  132. CARBON_SEM_IR_INST_KIND(SpliceInst)
  133. CARBON_SEM_IR_INST_KIND(StringLiteral)
  134. CARBON_SEM_IR_INST_KIND(StructAccess)
  135. CARBON_SEM_IR_INST_KIND(StructInit)
  136. CARBON_SEM_IR_INST_KIND(StructLiteral)
  137. CARBON_SEM_IR_INST_KIND(StructType)
  138. CARBON_SEM_IR_INST_KIND(StructValue)
  139. CARBON_SEM_IR_INST_KIND(SymbolicBinding)
  140. CARBON_SEM_IR_INST_KIND(SymbolicBindingPattern)
  141. CARBON_SEM_IR_INST_KIND(SymbolicBindingType)
  142. CARBON_SEM_IR_INST_KIND(Temporary)
  143. CARBON_SEM_IR_INST_KIND(TemporaryStorage)
  144. CARBON_SEM_IR_INST_KIND(TupleAccess)
  145. CARBON_SEM_IR_INST_KIND(TupleInit)
  146. CARBON_SEM_IR_INST_KIND(TupleLiteral)
  147. CARBON_SEM_IR_INST_KIND(TuplePattern)
  148. CARBON_SEM_IR_INST_KIND(TupleType)
  149. CARBON_SEM_IR_INST_KIND(TupleValue)
  150. CARBON_SEM_IR_INST_KIND(TypeOfInst)
  151. CARBON_SEM_IR_INST_KIND(TypeType)
  152. CARBON_SEM_IR_INST_KIND(UnaryOperatorNot)
  153. CARBON_SEM_IR_INST_KIND(UnboundElementType)
  154. CARBON_SEM_IR_INST_KIND(UninitializedValue)
  155. CARBON_SEM_IR_INST_KIND(ValueAsRef)
  156. CARBON_SEM_IR_INST_KIND(ValueBinding)
  157. CARBON_SEM_IR_INST_KIND(ValueBindingPattern)
  158. CARBON_SEM_IR_INST_KIND(ValueOfInitializer)
  159. CARBON_SEM_IR_INST_KIND(ValueParam)
  160. CARBON_SEM_IR_INST_KIND(ValueParamPattern)
  161. CARBON_SEM_IR_INST_KIND(VarParamPattern)
  162. CARBON_SEM_IR_INST_KIND(VarPattern)
  163. CARBON_SEM_IR_INST_KIND(VarStorage)
  164. CARBON_SEM_IR_INST_KIND(VtableDecl)
  165. CARBON_SEM_IR_INST_KIND(VtableType)
  166. CARBON_SEM_IR_INST_KIND(VtablePtr)
  167. CARBON_SEM_IR_INST_KIND(WhereExpr)
  168. CARBON_SEM_IR_INST_KIND(WitnessType)
  169. #undef CARBON_SEM_IR_INST_KIND
  170. #undef CARBON_SEM_IR_BUILTIN_INST_KIND