Delete unused NoOp instruction (#3586)

This commit is contained in:
josh11b
2024-01-10 22:40:34 +00:00
committed by GitHub
parent 7c151a9b47
commit 5e004b854e
5 changed files with 0 additions and 18 deletions
-1
View File
@@ -953,7 +953,6 @@ class TypeCompleter {
case SemIR::LazyImportRef::Kind:
case SemIR::NameRef::Kind:
case SemIR::Namespace::Kind:
case SemIR::NoOp::Kind:
case SemIR::Param::Kind:
case SemIR::RealLiteral::Kind:
case SemIR::Return::Kind:
-5
View File
@@ -242,11 +242,6 @@ auto HandleNamespace(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
FatalErrorIfEncountered(inst);
}
auto HandleNoOp(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
SemIR::NoOp /*inst*/) -> void {
// No action to take.
}
auto HandleParam(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
SemIR::Param /*inst*/) -> void {
CARBON_FATAL() << "Parameters should be lowered by `BuildFunctionDefinition`";
-3
View File
@@ -226,7 +226,6 @@ static auto GetTypePrecedence(InstKind kind) -> int {
case IntLiteral::Kind:
case LazyImportRef::Kind:
case Namespace::Kind:
case NoOp::Kind:
case Param::Kind:
case RealLiteral::Kind:
case Return::Kind:
@@ -433,7 +432,6 @@ auto File::StringifyTypeExpr(InstId outer_inst_id) const -> std::string {
case IntLiteral::Kind:
case LazyImportRef::Kind:
case Namespace::Kind:
case NoOp::Kind:
case Param::Kind:
case RealLiteral::Kind:
case Return::Kind:
@@ -490,7 +488,6 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory {
case InterfaceDecl::Kind:
case LazyImportRef::Kind:
case Namespace::Kind:
case NoOp::Kind:
case Return::Kind:
case ReturnExpr::Kind:
case StructTypeField::Kind:
-1
View File
@@ -52,7 +52,6 @@ CARBON_SEM_IR_INST_KIND(IntLiteral)
CARBON_SEM_IR_INST_KIND(LazyImportRef)
CARBON_SEM_IR_INST_KIND(NameRef)
CARBON_SEM_IR_INST_KIND(Namespace)
CARBON_SEM_IR_INST_KIND(NoOp)
CARBON_SEM_IR_INST_KIND(Param)
CARBON_SEM_IR_INST_KIND(PointerType)
CARBON_SEM_IR_INST_KIND(RealLiteral)
-8
View File
@@ -453,14 +453,6 @@ struct Namespace {
NameScopeId name_scope_id;
};
struct NoOp {
static constexpr auto Kind = InstKind::NoOp.Define("no_op");
// TODO: Delete since now unused.
Parse::NodeId parse_node;
// This instruction doesn't produce a value, so has no type.
};
struct Param {
static constexpr auto Kind = InstKind::Param.Define("param");