stage1 重构代码新增c后端

This commit is contained in:
zzy committed 2026-10-13 13:14:48 +08:00
1 parent fc2d8f8db4
commit 3714c2d142
24 files changed
+1539 -593

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#ifndef __SPL_IR2C_H__
#define __SPL_IR2C_H__
#include "spl_attr.h"
#include "spl_ir.h"
#include "spl_layout.h"
#include "spl_type.h"
/* 生成结果的字节缓冲(C 源码文本);调用方负责初始化与释放。 */
typedef VEC(char) spl_ir2c_buf_t;
/* 生成 C99 源码追加到 out;返回 false 表示遇到不支持的结构(已在输出中就地标注)。 */
bool spl_ir2c_run(const spl_ir_t *ir, const spl_type_t *type, spl_layout_t *layout,
const spl_attr_t *attr, spl_ir2c_buf_t *out);
#endif /* __SPL_IR2C_H__ */