MCPcopy Create free account
hub / github.com/chigraph/chigraph / functionType

Method functionType

libchigraph/src/GraphFunction.cpp:283–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283llvm::FunctionType* GraphFunction::functionType() const {
284 std::vector<llvm::Type*> arguments;
285 arguments.reserve(1 + dataInputs().size() + dataOutputs().size());
286
287 // this is for which exec input
288 arguments.push_back(llvm::IntegerType::getInt32Ty(context().llvmContext()));
289
290 for (const auto& p : dataInputs()) { arguments.push_back(p.type.llvmType()); }
291
292 // make these pointers
293 for (const auto& p : dataOutputs()) {
294 arguments.push_back(llvm::PointerType::get(p.type.llvmType(), 0));
295 }
296
297 return llvm::FunctionType::get(llvm::IntegerType::getInt32Ty(context().llvmContext()),
298 arguments, false);
299}
300
301void GraphFunction::addExecInput(std::string name, size_t addBefore) {
302 // invalidate the cache

Callers 2

compileFunctionFunction · 0.80

Calls 2

getFunction · 0.85
llvmTypeMethod · 0.80

Tested by

no test coverage detected