可以处理生成加法的IR

This commit is contained in:
jing
2025-12-28 18:44:48 +08:00
parent 77bee889d7
commit e941cced9b
42 changed files with 919 additions and 158 deletions

View File

@@ -1,4 +1,10 @@
// IR Module
// - 保存全局变量与函数列表
// - 维护与目标相关的模块级信息(如需要)与符号表
#include "ir/IR.h"
namespace ir {
Function* Module::CreateFunction(const std::string& name) {
functions_.push_back(std::make_unique<Function>(name));
return functions_.back().get();
}
} // namespace ir