| 115 | } |
| 116 | |
| 117 | Result codegen( |
| 118 | size_t /*inputExecID*/, const llvm::DebugLoc& nodeLocation, |
| 119 | const std::vector<llvm::Value*>& io, llvm::BasicBlock* codegenInto, |
| 120 | const std::vector<llvm::BasicBlock*>& outputBlocks, |
| 121 | std::unordered_map<std::string, std::shared_ptr<void>>& /*compileCache*/) override { |
| 122 | assert(io.size() == 1 && codegenInto != nullptr && outputBlocks.size() == 1); |
| 123 | |
| 124 | llvm::IRBuilder<> builder(codegenInto); |
| 125 | builder.SetCurrentDebugLocation(nodeLocation); |
| 126 | |
| 127 | builder.CreateStore(builder.getInt32(number), io[0], false); |
| 128 | builder.CreateBr(outputBlocks[0]); |
| 129 | |
| 130 | return {}; |
| 131 | } |
| 132 | |
| 133 | std::unique_ptr<NodeType> clone() const override { |
| 134 | return std::make_unique<ConstIntNodeType>(*this); |
nothing calls this directly
no outgoing calls
no test coverage detected