inst_kind.def 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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(AdaptDecl)
  22. CARBON_SEM_IR_INST_KIND(AddrOf)
  23. CARBON_SEM_IR_INST_KIND(AddrPattern)
  24. CARBON_SEM_IR_INST_KIND(ArrayIndex)
  25. CARBON_SEM_IR_INST_KIND(ArrayInit)
  26. CARBON_SEM_IR_INST_KIND(ArrayType)
  27. CARBON_SEM_IR_INST_KIND(AsCompatible)
  28. CARBON_SEM_IR_INST_KIND(Assign)
  29. CARBON_SEM_IR_INST_KIND(AssociatedConstantDecl)
  30. CARBON_SEM_IR_INST_KIND(AssociatedEntity)
  31. CARBON_SEM_IR_INST_KIND(AssociatedEntityType)
  32. CARBON_SEM_IR_INST_KIND(AutoType)
  33. CARBON_SEM_IR_INST_KIND(BaseDecl)
  34. CARBON_SEM_IR_INST_KIND(BindAlias)
  35. CARBON_SEM_IR_INST_KIND(BindName)
  36. CARBON_SEM_IR_INST_KIND(BindSymbolicName)
  37. CARBON_SEM_IR_INST_KIND(BindValue)
  38. CARBON_SEM_IR_INST_KIND(BindingPattern)
  39. CARBON_SEM_IR_INST_KIND(BlockArg)
  40. CARBON_SEM_IR_INST_KIND(BoolLiteral)
  41. CARBON_SEM_IR_INST_KIND(BoolType)
  42. CARBON_SEM_IR_INST_KIND(BoundMethod)
  43. CARBON_SEM_IR_INST_KIND(BoundMethodType)
  44. CARBON_SEM_IR_INST_KIND(Branch)
  45. CARBON_SEM_IR_INST_KIND(BranchIf)
  46. CARBON_SEM_IR_INST_KIND(BranchWithArg)
  47. CARBON_SEM_IR_INST_KIND(Call)
  48. CARBON_SEM_IR_INST_KIND(CharLiteralType)
  49. CARBON_SEM_IR_INST_KIND(CharLiteralValue)
  50. CARBON_SEM_IR_INST_KIND(ClassDecl)
  51. CARBON_SEM_IR_INST_KIND(ClassElementAccess)
  52. CARBON_SEM_IR_INST_KIND(ClassInit)
  53. CARBON_SEM_IR_INST_KIND(ClassType)
  54. CARBON_SEM_IR_INST_KIND(CompleteTypeWitness)
  55. CARBON_SEM_IR_INST_KIND(ConstType)
  56. CARBON_SEM_IR_INST_KIND(ConvertToValueAction)
  57. CARBON_SEM_IR_INST_KIND(Converted)
  58. CARBON_SEM_IR_INST_KIND(CustomLayoutType)
  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(FunctionDecl)
  71. CARBON_SEM_IR_INST_KIND(FunctionType)
  72. CARBON_SEM_IR_INST_KIND(FunctionTypeWithSelfType)
  73. CARBON_SEM_IR_INST_KIND(GenericClassType)
  74. CARBON_SEM_IR_INST_KIND(GenericInterfaceType)
  75. CARBON_SEM_IR_INST_KIND(ImplDecl)
  76. CARBON_SEM_IR_INST_KIND(LookupImplWitness)
  77. CARBON_SEM_IR_INST_KIND(ImplWitness)
  78. CARBON_SEM_IR_INST_KIND(ImplWitnessAccess)
  79. CARBON_SEM_IR_INST_KIND(ImplWitnessAccessSubstituted)
  80. CARBON_SEM_IR_INST_KIND(ImplWitnessAssociatedConstant)
  81. CARBON_SEM_IR_INST_KIND(ImplWitnessTable)
  82. CARBON_SEM_IR_INST_KIND(ImplWitnessTablePlaceholder)
  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(InitializeFrom)
  88. CARBON_SEM_IR_INST_KIND(InstType)
  89. CARBON_SEM_IR_INST_KIND(InstValue)
  90. CARBON_SEM_IR_INST_KIND(IntLiteralType)
  91. CARBON_SEM_IR_INST_KIND(IntType)
  92. CARBON_SEM_IR_INST_KIND(IntValue)
  93. CARBON_SEM_IR_INST_KIND(InterfaceDecl)
  94. CARBON_SEM_IR_INST_KIND(NameBindingDecl)
  95. CARBON_SEM_IR_INST_KIND(NameRef)
  96. CARBON_SEM_IR_INST_KIND(Namespace)
  97. CARBON_SEM_IR_INST_KIND(NamespaceType)
  98. CARBON_SEM_IR_INST_KIND(OutParam)
  99. CARBON_SEM_IR_INST_KIND(OutParamPattern)
  100. CARBON_SEM_IR_INST_KIND(PartialType)
  101. CARBON_SEM_IR_INST_KIND(PatternType)
  102. CARBON_SEM_IR_INST_KIND(PointerType)
  103. CARBON_SEM_IR_INST_KIND(RefParam)
  104. CARBON_SEM_IR_INST_KIND(RefParamPattern)
  105. CARBON_SEM_IR_INST_KIND(RefineTypeAction)
  106. CARBON_SEM_IR_INST_KIND(RequireCompleteType)
  107. CARBON_SEM_IR_INST_KIND(RequirementBaseFacetType)
  108. CARBON_SEM_IR_INST_KIND(RequirementEquivalent)
  109. CARBON_SEM_IR_INST_KIND(RequirementImpls)
  110. CARBON_SEM_IR_INST_KIND(RequirementRewrite)
  111. CARBON_SEM_IR_INST_KIND(Return)
  112. CARBON_SEM_IR_INST_KIND(ReturnExpr)
  113. CARBON_SEM_IR_INST_KIND(ReturnSlot)
  114. CARBON_SEM_IR_INST_KIND(ReturnSlotPattern)
  115. CARBON_SEM_IR_INST_KIND(SpecificConstant)
  116. CARBON_SEM_IR_INST_KIND(SpecificFunction)
  117. CARBON_SEM_IR_INST_KIND(SpecificFunctionType)
  118. CARBON_SEM_IR_INST_KIND(SpecificImplFunction)
  119. CARBON_SEM_IR_INST_KIND(SpliceBlock)
  120. CARBON_SEM_IR_INST_KIND(SpliceInst)
  121. CARBON_SEM_IR_INST_KIND(StringLiteral)
  122. CARBON_SEM_IR_INST_KIND(StructAccess)
  123. CARBON_SEM_IR_INST_KIND(StructInit)
  124. CARBON_SEM_IR_INST_KIND(StructLiteral)
  125. CARBON_SEM_IR_INST_KIND(StructType)
  126. CARBON_SEM_IR_INST_KIND(StructValue)
  127. CARBON_SEM_IR_INST_KIND(SymbolicBindingPattern)
  128. CARBON_SEM_IR_INST_KIND(Temporary)
  129. CARBON_SEM_IR_INST_KIND(TemporaryStorage)
  130. CARBON_SEM_IR_INST_KIND(TupleAccess)
  131. CARBON_SEM_IR_INST_KIND(TupleInit)
  132. CARBON_SEM_IR_INST_KIND(TupleLiteral)
  133. CARBON_SEM_IR_INST_KIND(TuplePattern)
  134. CARBON_SEM_IR_INST_KIND(TupleType)
  135. CARBON_SEM_IR_INST_KIND(TupleValue)
  136. CARBON_SEM_IR_INST_KIND(TypeOfInst)
  137. CARBON_SEM_IR_INST_KIND(TypeType)
  138. CARBON_SEM_IR_INST_KIND(UnaryOperatorNot)
  139. CARBON_SEM_IR_INST_KIND(UnboundElementType)
  140. CARBON_SEM_IR_INST_KIND(ValueAsRef)
  141. CARBON_SEM_IR_INST_KIND(ValueOfInitializer)
  142. CARBON_SEM_IR_INST_KIND(ValueParam)
  143. CARBON_SEM_IR_INST_KIND(ValueParamPattern)
  144. CARBON_SEM_IR_INST_KIND(VarPattern)
  145. CARBON_SEM_IR_INST_KIND(VarStorage)
  146. CARBON_SEM_IR_INST_KIND(VtableDecl)
  147. CARBON_SEM_IR_INST_KIND(VtableType)
  148. CARBON_SEM_IR_INST_KIND(VtablePtr)
  149. CARBON_SEM_IR_INST_KIND(WhereExpr)
  150. CARBON_SEM_IR_INST_KIND(WitnessType)
  151. #undef CARBON_SEM_IR_INST_KIND
  152. #undef CARBON_SEM_IR_BUILTIN_INST_KIND