From e782898e420c7f2abd83b97c160194d0e70598dd Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 05:27:14 +0000 Subject: feat(calls): support standalone calls and void pointer casts Co-Authored-By: Claude Fable 5.1 --- include/cps/CodeGen.h | 2 ++ include/cps/FunctionGen.h | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 883cf71..8f84004 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -106,6 +106,8 @@ class CodeGen { bool emitLValue(ExprAST *E, LValueInfo &Out); // The rvalue read: load + the STRING null->"" guard. llvm::Value *loadFromLValue(const LValueInfo &LV); + llvm::Value *emitCall(const std::string &Callee, + const std::vector> &ArgExprs, int Line); bool marshalCallArgs(const std::string &Callee, const std::vector> &ArgExprs, int Line, diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h index 4bf4519..fd874d2 100644 --- a/include/cps/FunctionGen.h +++ b/include/cps/FunctionGen.h @@ -87,9 +87,7 @@ public: llvm::Function *emitFunctionDef(FunctionDefAST *FuncAST, const std::function &StmtEmitter, unsigned ScopeID); - llvm::Value *emitCallExpr(CallExprAST *Call, const std::vector &Args); - - void emitCallStmt(CallStmtAST *Call, const std::vector &Args); + llvm::Value *emitCall(const std::string &Callee, const std::vector &Args); void emitReturn(ReturnStmtAST *Ret, llvm::Value *RetVal); }; -- cgit v1.3.1-4-g156e