fix(dev): 统一 IR/MIR 异常前缀

This commit is contained in:
Lane0218
2026-03-12 15:01:19 +08:00
parent f3d0102376
commit a7779038ca
6 changed files with 53 additions and 32 deletions

View File

@@ -8,6 +8,8 @@
#include <stdexcept>
#include <string>
#include "utils/Log.h"
namespace ir {
static const char* TypeToString(const Type& ty) {
@@ -19,7 +21,7 @@ static const char* TypeToString(const Type& ty) {
case Type::Kind::PtrInt32:
return "i32*";
}
throw std::runtime_error("未知类型");
throw std::runtime_error(FormatError("ir", "未知类型"));
}
static const char* OpcodeToString(Opcode op) {