aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/StatementGen.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 09:13:32 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 09:13:32 +0000
commite1f41ed9fafaf7eb4f2da6878a3fabcf2f7c021e (patch)
treec4cd67b10e8513bb6dfad58e3c3b55033745ed12 /lib/CodeGen/StatementGen.cc
parent59a2bb6acb975d820ab29be63a6f909d6e6ef40f (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/StatementGen.cc')
-rw-r--r--lib/CodeGen/StatementGen.cc5
1 files changed, 3 insertions, 2 deletions
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<int> Location(DiagnosticLine, Stmt && Stmt->getLine() ? Stmt->getLine() : DiagnosticLine);
if (!Stmt) return;
- if (dynamic_cast<IncludeStmtAST*>(Stmt) || dynamic_cast<GlobalBlockAST*>(Stmt)) {
- reportError("INCLUDE and GLOBAL are not supported yet");
+ if (dynamic_cast<IncludeStmtAST*>(Stmt)) return;
+ if (dynamic_cast<GlobalBlockAST*>(Stmt)) {
+ reportError("GLOBAL is not supported yet");
return;
}