| 436 | |
| 437 | struct BreakStructNodeType : public NodeType { |
| 438 | BreakStructNodeType(GraphStruct& ty) : NodeType(ty.module()), mStruct{&ty} { |
| 439 | setName("_break_" + ty.name()); |
| 440 | setDescription("Break a " + ty.name() + " structure"); |
| 441 | makePure(); |
| 442 | |
| 443 | // set input to just be the struct |
| 444 | setDataInputs({{"", ty.dataType()}}); |
| 445 | |
| 446 | // set outputs |
| 447 | setDataOutputs(ty.types()); |
| 448 | } |
| 449 | |
| 450 | Result codegen(size_t /*execInputID*/, const llvm::DebugLoc& nodeLocation, |
| 451 | const std::vector<llvm::Value*>& io, llvm::BasicBlock* codegenInto, |