aboutsummaryrefslogtreecommitdiff
path: root/include/cps/FunctionGen.h
diff options
context:
space:
mode:
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);