MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / new

Method new

crates/rustc_codegen_nvvm/src/lib.rs:339–346  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

337
338impl LlvmMod {
339 pub fn new(name: &str) -> Self {
340 unsafe {
341 // TODO(RDambrosio016): does shouldDiscardNames affect NVVM at all?
342 let llcx = llvm::LLVMRustContextCreate(false);
343 let llmod = create_module(llcx, name) as *const _;
344 LlvmMod { llcx, llmod }
345 }
346 }
347}
348
349impl Drop for LlvmMod {

Callers

nothing calls this directly

Calls 2

LLVMRustContextCreateFunction · 0.85
create_moduleFunction · 0.85

Tested by

no test coverage detected