fix: 消除 Br 和 CondBr 未处理的编译警告

在 LowerInstruction 的 switch 中添加 Br 和 CondBr case。
这两个指令在 LowerModule 中已经处理,不会传递到 LowerInstruction,
但为了消除编译器的 -Wswitch 警告,添加这两个 case 并直接返回。

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Shrink 2 weeks ago
parent 3078c4cc5a
commit 693f54adf7

@ -871,6 +871,11 @@ void LowerInstruction(const ir::Instruction& inst, MachineFunction& function,
}
return;
}
// Br 和 CondBr 在 LowerModule 中已处理,不应到达这里
case ir::Opcode::Br:
case ir::Opcode::CondBr:
return;
}
throw std::runtime_error(FormatError("mir", "暂不支持该 IR 指令"));

Loading…
Cancel
Save