From e1f41ed9fafaf7eb4f2da6878a3fabcf2f7c021e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 09:13:32 +0000 Subject: feat(driver): compile multiple source files with INCLUDE visibility Reject builds without an entry program and duplicate cross-file definitions. Preserve source order for each unit's own constants and import visible exports. Co-Authored-By: Claude Opus 5.5 --- lib/CodeGen/StatementGen.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/StatementGen.cc') diff --git a/lib/CodeGen/StatementGen.cc b/lib/CodeGen/StatementGen.cc index 529f7f0..5edb303 100644 --- a/lib/CodeGen/StatementGen.cc +++ b/lib/CodeGen/StatementGen.cc @@ -13,8 +13,9 @@ void CodeGen::emitStmt(StmtAST *Stmt) { SaveAndRestore Location(DiagnosticLine, Stmt && Stmt->getLine() ? Stmt->getLine() : DiagnosticLine); if (!Stmt) return; - if (dynamic_cast(Stmt) || dynamic_cast(Stmt)) { - reportError("INCLUDE and GLOBAL are not supported yet"); + if (dynamic_cast(Stmt)) return; + if (dynamic_cast(Stmt)) { + reportError("GLOBAL is not supported yet"); return; } -- cgit v1.3.1-4-g156e