This commit is contained in:
jing
2025-12-29 20:11:51 +08:00
parent c153604c2e
commit e1c1f2a40d
14 changed files with 402 additions and 27 deletions

View File

@@ -1,4 +1,12 @@
// IR Function
// - 保存参数列表、基本块列表
// - 记录函数属性/元信息(按需要扩展)
#include "ir/IR.h"
namespace ir {
Function::Function(std::string name, std::shared_ptr<Type> ret_type)
: Value(std::move(ret_type), std::move(name)),
entry_(std::make_unique<BasicBlock>("entry")) {}
} // namespace ir