feat(ir): 启用LIR模块并重构HIR组件结构

- 在cbuild.toml中启用lir依赖项,取消注释相关配置
- 重构libs/README.md文档,添加详细的库说明和层级结构
- 重命名头文件以统一命名规范:ast_def.h → scc_ast_def.h,
  ast_dump.h → scc_ast_dump.h, hir相关文件添加scc前缀
- 更新include路径以匹配新的文件命名
- 在cfg模块中添加symbol ID类型和linkage枚举,完善符号表功能
- 实现cfg模块中的符号添加、查找和获取功能
- 修改HIR中meta字段替换原有的attribute字段,更新相关访问宏
- 修复HIR构建器中的函数元数据访问错误
- 为LIR模块创建完整的头文件结构,包括指令定义、转换器等组件
This commit is contained in:
zzy
2026-04-21 20:35:37 +08:00
parent 0fbfb36262
commit e850b5c981
30 changed files with 1588 additions and 2627 deletions

View File

@@ -1,8 +1,7 @@
#ifndef __SCC_AST_H__
#define __SCC_AST_H__
#include "ast_def.h"
#include "ast_dump.h"
#include "scc_ast_def.h"
// decls can be nullptr but maybe warning
static inline void

View File

@@ -6,7 +6,7 @@
#ifndef __SCC_AST_DUMP_H__
#define __SCC_AST_DUMP_H__
#include "ast_def.h"
#include "scc_ast_def.h"
#include <scc_tree_dump.h>
/**

View File

@@ -3,7 +3,7 @@
* @brief AST dump 实现
*/
#include <ast_dump.h>
#include <scc_ast_dump.h>
#include <scc_tree_dump.h>
static const char *node_type_names[] = {