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

Method codegen

libchigraph/src/LangModule.cpp:181–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179 }
180
181 Result codegen(
182 size_t /*inputExecID*/, const llvm::DebugLoc& nodeLocation,
183 const std::vector<llvm::Value*>& io, llvm::BasicBlock* codegenInto,
184 const std::vector<llvm::BasicBlock*>& outputBlocks,
185 std::unordered_map<std::string, std::shared_ptr<void>>& /*compileCache*/) override {
186 assert(io.size() == 1 && codegenInto != nullptr && outputBlocks.size() == 1);
187
188 llvm::IRBuilder<> builder(codegenInto);
189 builder.SetCurrentDebugLocation(nodeLocation);
190
191 builder.CreateStore(builder.getInt1(value), io[0], false);
192 builder.CreateBr(outputBlocks[0]);
193
194 return {};
195 }
196
197 std::unique_ptr<NodeType> clone() const override {
198 return std::make_unique<ConstBoolNodeType>(*this);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected