mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 16:11:06 +01:00
Delete unused NoOp instruction (#3586)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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`";
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user