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 --- lib/CodeGen/FunctionGen.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lib/CodeGen/FunctionGen.cc') diff --git a/lib/CodeGen/FunctionGen.cc b/lib/CodeGen/FunctionGen.cc index a155f60..10bd3fa 100644 --- a/lib/CodeGen/FunctionGen.cc +++ b/lib/CodeGen/FunctionGen.cc @@ -243,14 +243,9 @@ static Value *GenerateCall(llvm::Module &Module, return Exceptions.emitCall(CalleeF, Args, "calltmp"); } -llvm::Value *FunctionGen::emitCallExpr(CallExprAST *Call, const std::vector &Args) { - const FuncSig *Sig = getSignature(Call->getCallee()); - return GenerateCall(Module, Exceptions, Sig ? Sig->Name : Call->getCallee(), Args, HadError); -} - -void FunctionGen::emitCallStmt(CallStmtAST *Call, const std::vector &Args) { - const FuncSig *Sig = getSignature(Call->getCallee()); - GenerateCall(Module, Exceptions, Sig ? Sig->Name : Call->getCallee(), Args, HadError); +llvm::Value *FunctionGen::emitCall(const std::string &Callee, const std::vector &Args) { + const FuncSig *Sig = getSignature(Callee); + return GenerateCall(Module, Exceptions, Sig ? Sig->Name : Callee, Args, HadError); } void FunctionGen::emitReturn(ReturnStmtAST *Ret, llvm::Value *RetVal) { -- cgit v1.3.1-4-g156e