mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 08:32:36 +00:00
SEMANTICS->SEM_IR in macro names. Update comments in sem_ir/node.h. (#3309)
* Shift to "sem_ir" continued from #3176. * Comments in `node.h` changed to reflect #3280.
This commit is contained in:
1 parent
efd8e1b144
commit
6d4d05f68a
12 files changed
+135
-146
No files matched your search
@@ -7,14 +7,14 @@
|
||||
namespace Carbon::SemIR {
|
||||
|
||||
CARBON_DEFINE_ENUM_CLASS_NAMES(NodeKind) = {
|
||||
#define CARBON_SEMANTICS_NODE_KIND(Name) CARBON_ENUM_CLASS_NAME_STRING(Name)
|
||||
#define CARBON_SEM_IR_NODE_KIND(Name) CARBON_ENUM_CLASS_NAME_STRING(Name)
|
||||
#include "toolchain/sem_ir/node_kind.def"
|
||||
};
|
||||
|
||||
// Returns the name to use for this node kind in Semantics IR.
|
||||
[[nodiscard]] auto NodeKind::ir_name() const -> llvm::StringRef {
|
||||
static constexpr llvm::StringRef Table[] = {
|
||||
#define CARBON_SEMANTICS_NODE_KIND_WITH_IR_NAME(Name, IR_Name) IR_Name,
|
||||
#define CARBON_SEM_IR_NODE_KIND_WITH_IR_NAME(Name, IR_Name) IR_Name,
|
||||
#include "toolchain/sem_ir/node_kind.def"
|
||||
};
|
||||
return Table[AsInt()];
|
||||
@@ -22,8 +22,7 @@ CARBON_DEFINE_ENUM_CLASS_NAMES(NodeKind) = {
|
||||
|
||||
auto NodeKind::value_kind() const -> NodeValueKind {
|
||||
static constexpr NodeValueKind Table[] = {
|
||||
#define CARBON_SEMANTICS_NODE_KIND_WITH_VALUE_KIND(Name, Kind) \
|
||||
NodeValueKind::Kind,
|
||||
#define CARBON_SEM_IR_NODE_KIND_WITH_VALUE_KIND(Name, Kind) NodeValueKind::Kind,
|
||||
#include "toolchain/sem_ir/node_kind.def"
|
||||
};
|
||||
return Table[AsInt()];
|
||||
@@ -31,7 +30,7 @@ auto NodeKind::value_kind() const -> NodeValueKind {
|
||||
|
||||
auto NodeKind::terminator_kind() const -> TerminatorKind {
|
||||
static constexpr TerminatorKind Table[] = {
|
||||
#define CARBON_SEMANTICS_NODE_KIND_WITH_TERMINATOR_KIND(Name, Kind) \
|
||||
#define CARBON_SEM_IR_NODE_KIND_WITH_TERMINATOR_KIND(Name, Kind) \
|
||||
TerminatorKind::Kind,
|
||||
#include "toolchain/sem_ir/node_kind.def"
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user