mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 18:36:41 +00:00
Change the builtin enum approach to enforce addition. (#2584)
It feels like every time I add a builtin, I forget to add it to the builtin IR. This approach enforces the addition of builtin nodes, and also takes advantage of the normalized structure to set types appropriately (I think the new approach is simpler on this aspect).
This commit is contained in:
1 parent
4fa71e32f5
commit
b2c60b4f53
5 files changed
+51
-37
No files matched your search
@@ -7,7 +7,8 @@
|
||||
namespace Carbon {
|
||||
|
||||
CARBON_DEFINE_ENUM_CLASS_NAMES(SemanticsBuiltinKind) = {
|
||||
#define CARBON_SEMANTICS_BUILTIN_KIND(Name) CARBON_ENUM_CLASS_NAME_STRING(Name)
|
||||
#define CARBON_SEMANTICS_BUILTIN_KIND_NAME(Name) \
|
||||
CARBON_ENUM_CLASS_NAME_STRING(Name)
|
||||
#include "toolchain/semantics/semantics_builtin_kind.def"
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user