aboutsummaryrefslogtreecommitdiff
path: root/include/cps/FunctionGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 08:34:42 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 08:34:42 +0000
commitabd56ef20bc8061bbecec29edd1301d324c2cb34 (patch)
tree8da9a14372a60d4df8bf58693c62c187765e7240 /include/cps/FunctionGen.h
parent59e3c50bcd58130e81e1f57b21d6e57b4d4aba6d (diff)
feat(classes): destroy stack objects at scope exit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/FunctionGen.h')
-rw-r--r--include/cps/FunctionGen.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h
index 5ff746d..777ab7d 100644
--- a/include/cps/FunctionGen.h
+++ b/include/cps/FunctionGen.h
@@ -64,6 +64,7 @@ private:
IdentifierMap<FuncSig> Signatures;
ArrayParamBinder BindArrayParam;
+ std::function<void(llvm::Value *, const std::string &, int)> RegisterCopy;
void createArgumentAllocas(llvm::Function *F, const std::vector<ParamDecl> &Params, bool IsMethod);
@@ -81,6 +82,10 @@ public:
void setArrayParamBinder(ArrayParamBinder Binder) { BindArrayParam = std::move(Binder); }
+ void setCopyRegistrar(std::function<void(llvm::Value *, const std::string &, int)> Registrar) {
+ RegisterCopy = std::move(Registrar);
+ }
+
const FuncSig *getSignature(const std::string &Name) const;
llvm::Function *emitPrototype(PrototypeAST *Proto);