Files
TransPyC/lib/core/LLVMCG/__init__.py
2026-07-18 19:25:40 +08:00

35 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
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',
]