inst_kind.def 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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(AddressOf)
  19. CARBON_SEM_IR_INST_KIND(ArrayIndex)
  20. CARBON_SEM_IR_INST_KIND(ArrayInit)
  21. CARBON_SEM_IR_INST_KIND(ArrayType)
  22. CARBON_SEM_IR_INST_KIND(Assign)
  23. CARBON_SEM_IR_INST_KIND(BaseDecl)
  24. CARBON_SEM_IR_INST_KIND(BindName)
  25. CARBON_SEM_IR_INST_KIND(BindValue)
  26. CARBON_SEM_IR_INST_KIND(BlockArg)
  27. CARBON_SEM_IR_INST_KIND(BoolLiteral)
  28. CARBON_SEM_IR_INST_KIND(BoundMethod)
  29. CARBON_SEM_IR_INST_KIND(Branch)
  30. CARBON_SEM_IR_INST_KIND(BranchIf)
  31. CARBON_SEM_IR_INST_KIND(BranchWithArg)
  32. CARBON_SEM_IR_INST_KIND(Builtin)
  33. CARBON_SEM_IR_INST_KIND(Call)
  34. CARBON_SEM_IR_INST_KIND(ClassDecl)
  35. CARBON_SEM_IR_INST_KIND(ClassElementAccess)
  36. CARBON_SEM_IR_INST_KIND(ClassInit)
  37. CARBON_SEM_IR_INST_KIND(ClassType)
  38. CARBON_SEM_IR_INST_KIND(ConstType)
  39. CARBON_SEM_IR_INST_KIND(Converted)
  40. CARBON_SEM_IR_INST_KIND(CrossRef)
  41. CARBON_SEM_IR_INST_KIND(Deref)
  42. CARBON_SEM_IR_INST_KIND(FieldDecl)
  43. CARBON_SEM_IR_INST_KIND(FunctionDecl)
  44. CARBON_SEM_IR_INST_KIND(Import)
  45. CARBON_SEM_IR_INST_KIND(InitializeFrom)
  46. CARBON_SEM_IR_INST_KIND(InterfaceDecl)
  47. CARBON_SEM_IR_INST_KIND(IntLiteral)
  48. CARBON_SEM_IR_INST_KIND(LazyImportRef)
  49. CARBON_SEM_IR_INST_KIND(NameRef)
  50. CARBON_SEM_IR_INST_KIND(Namespace)
  51. CARBON_SEM_IR_INST_KIND(NoOp)
  52. CARBON_SEM_IR_INST_KIND(Param)
  53. CARBON_SEM_IR_INST_KIND(PointerType)
  54. CARBON_SEM_IR_INST_KIND(RealLiteral)
  55. CARBON_SEM_IR_INST_KIND(ReturnExpr)
  56. CARBON_SEM_IR_INST_KIND(Return)
  57. CARBON_SEM_IR_INST_KIND(SelfParam)
  58. CARBON_SEM_IR_INST_KIND(SpliceBlock)
  59. CARBON_SEM_IR_INST_KIND(StringLiteral)
  60. CARBON_SEM_IR_INST_KIND(StructAccess)
  61. CARBON_SEM_IR_INST_KIND(StructInit)
  62. CARBON_SEM_IR_INST_KIND(StructLiteral)
  63. CARBON_SEM_IR_INST_KIND(StructTypeField)
  64. CARBON_SEM_IR_INST_KIND(StructType)
  65. CARBON_SEM_IR_INST_KIND(StructValue)
  66. CARBON_SEM_IR_INST_KIND(TemporaryStorage)
  67. CARBON_SEM_IR_INST_KIND(Temporary)
  68. CARBON_SEM_IR_INST_KIND(TupleAccess)
  69. CARBON_SEM_IR_INST_KIND(TupleIndex)
  70. CARBON_SEM_IR_INST_KIND(TupleInit)
  71. CARBON_SEM_IR_INST_KIND(TupleLiteral)
  72. CARBON_SEM_IR_INST_KIND(TupleType)
  73. CARBON_SEM_IR_INST_KIND(TupleValue)
  74. CARBON_SEM_IR_INST_KIND(UnaryOperatorNot)
  75. CARBON_SEM_IR_INST_KIND(UnboundElementType)
  76. CARBON_SEM_IR_INST_KIND(ValueAsRef)
  77. CARBON_SEM_IR_INST_KIND(ValueOfInitializer)
  78. CARBON_SEM_IR_INST_KIND(VarStorage)
  79. #undef CARBON_SEM_IR_INST_KIND