feat: for 循环 + range (for i in start..end)
- lexer: TOK_FOR, TOK_IN, TOK_DOT_DOT + 修复数字中 .. 解析
- parser: for-in-range → desugar to {let mut, while, assign}
- 零 sema/codegen 改动,复用现有机制
- 新增 2 个集成测试 (10_for_range.l, 11_for_step2.l)
- mem2reg: LLVM 22 C API 不导出,标注已知限制
基于 Codex 分析报告 §6 P0 #3。
This commit is contained in:
@@ -457,6 +457,7 @@ LLVMModuleRef codegen_module(AstNode* ast, Arena* codegen_arena,
|
||||
}
|
||||
|
||||
// 验证模块(使用 ReturnStatus 以获取完整错误消息)
|
||||
// 注: LLVM 22 C API 不再导出 mem2reg pass, alloca 优化需用 opt 工具
|
||||
char* verify_err = NULL;
|
||||
if (LLVMVerifyModule(ctx.module, LLVMReturnStatusAction, &verify_err)) {
|
||||
*error_msg = verify_err ? verify_err : "模块验证失败(错误消息为 NULL)";
|
||||
|
||||
Reference in New Issue
Block a user