| 393 | |
| 394 | struct MakeStructNodeType : public NodeType { |
| 395 | MakeStructNodeType(GraphStruct& ty) : NodeType(ty.module()), mStruct{&ty} { |
| 396 | setName("_make_" + ty.name()); |
| 397 | setDescription("Make a " + ty.name() + " structure"); |
| 398 | makePure(); |
| 399 | |
| 400 | // set inputs |
| 401 | setDataInputs(ty.types()); |
| 402 | |
| 403 | // set output to just be the struct |
| 404 | setDataOutputs({{"", ty.dataType()}}); |
| 405 | } |
| 406 | |
| 407 | Result codegen(size_t /*execInputID*/, const llvm::DebugLoc& nodeLocation, |
| 408 | const std::vector<llvm::Value*>& io, llvm::BasicBlock* codegenInto, |