可用的回归测试通过的标准版本

This commit is contained in:
2026-06-18 00:39:43 +08:00
parent bffb0cb6b7
commit e02c867edf
365 changed files with 22562 additions and 24532 deletions

View File

@@ -0,0 +1,34 @@
"""
LLVMCG 包 - LLVM 代码生成器模块
将 LlvmCodeGenerator.py 拆分为多个 Mixin 模块:
- BaseGen: 基础设施__init__、平台解析、名称修饰、函数查找
- TypeConvert: 类型转换CType -> LLVM IR 类型)
- StructGen: 结构体生成struct/vtable 定义与初始化)
- MemoryOps: 内存操作alloca/Load/store/coerce
- ExprGen: 表达式生成常量、二元运算、返回、printf
- FuncGen: 函数处理(参数调整、成员偏移、函数声明)
- VaArg: 变长参数处理va_start/va_end/va_arg
"""
from lib.core.LLVMCG.BaseGen import (
BaseGenMixin,
VaArgInstruction,
)
from lib.core.LLVMCG.TypeConvert import TypeConvertMixin
from lib.core.LLVMCG.StructGen import StructGenMixin
from lib.core.LLVMCG.MemoryOps import MemoryOpsMixin
from lib.core.LLVMCG.ExprGen import ExprGenMixin
from lib.core.LLVMCG.FuncGen import FuncGenMixin
from lib.core.LLVMCG.VaArg import VaArgMixin
__all__ = [
'BaseGenMixin',
'TypeConvertMixin',
'StructGenMixin',
'MemoryOpsMixin',
'ExprGenMixin',
'FuncGenMixin',
'VaArgMixin',
'VaArgInstruction',
]