aboutsummaryrefslogtreecommitdiff
path: root/include/cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 03:45:06 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 03:58:26 +0000
commit1d2bb133b7a3540aeb81c5f9616cb366aebc919f (patch)
treeb4b90c1d991ad8dd05033dfbdbb18a60a1343cfe /include/cps
parent91e506e404c0d285ec1ec77196e83248c8c77161 (diff)
refactor(codegen): share file keyword filename operand emission
EOF, OPENFILE, READFILE and CLOSEFILE each rejected a whole-array filename and then emitted it as a C string. Route them through a private emitFileNameOperand helper; diagnostics are unchanged. WRITEFILE keeps its own combined check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps')
-rw-r--r--include/cps/CodeGen.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h
index 73068bf..2d77284 100644
--- a/include/cps/CodeGen.h
+++ b/include/cps/CodeGen.h
@@ -128,6 +128,7 @@ class CodeGen {
llvm::Value *emitStringFromCString(llvm::Value *Text);
llvm::Value *emitStringCString(llvm::Value *Value);
llvm::Value *emitCStringExpr(ExprAST *Expr);
+ llvm::Value *emitFileNameOperand(ExprAST *E, const char *Keyword);
bool containsString(const TypeInfo *Type) const;
std::unique_ptr<TypeSystem> Types;