| 30 | } |
| 31 | |
| 32 | Result codegen( |
| 33 | size_t /*execInputID*/, const llvm::DebugLoc& nodeLocation, |
| 34 | const std::vector<llvm::Value*>& io, llvm::BasicBlock* codegenInto, |
| 35 | const std::vector<llvm::BasicBlock*>& outputBlocks, |
| 36 | std::unordered_map<std::string, std::shared_ptr<void>>& /*compileCache*/) override { |
| 37 | assert(io.size() == 1 && codegenInto != nullptr && outputBlocks.size() == 2); |
| 38 | |
| 39 | llvm::IRBuilder<> builder(codegenInto); |
| 40 | builder.SetCurrentDebugLocation(nodeLocation); |
| 41 | |
| 42 | builder.CreateCondBr(io[0], outputBlocks[0], outputBlocks[1]); |
| 43 | |
| 44 | return {}; |
| 45 | } |
| 46 | |
| 47 | std::unique_ptr<NodeType> clone() const override { return std::make_unique<IfNodeType>(*this); } |
| 48 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected