fix(dev): 统一 IR/MIR 异常前缀
This commit is contained in:
@@ -3,13 +3,15 @@
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "utils/Log.h"
|
||||
|
||||
namespace mir {
|
||||
namespace {
|
||||
|
||||
const FrameSlot& GetFrameSlot(const MachineFunction& function,
|
||||
const Operand& operand) {
|
||||
if (operand.kind() != Operand::Kind::FrameIndex) {
|
||||
throw std::runtime_error("期望 FrameIndex 操作数");
|
||||
throw std::runtime_error(FormatError("mir", "期望 FrameIndex 操作数"));
|
||||
}
|
||||
return function.frame_slot(operand.frame_index());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user