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

Method dynamic_alloca

crates/rustc_codegen_nvvm/src/builder.rs:454–461  ·  view source on GitHub ↗
(&mut self, ty: &'ll Type, align: Align)

Source from the content-addressed store, hash-verified

452 }
453
454 fn dynamic_alloca(&mut self, ty: &'ll Type, align: Align) -> &'ll Value {
455 trace!("Dynamic Alloca `{:?}`", ty);
456 unsafe {
457 let alloca = llvm::LLVMBuildAlloca(self.llbuilder, ty, unnamed());
458 llvm::LLVMSetAlignment(alloca, align.bytes() as c_uint);
459 alloca
460 }
461 }
462
463 fn array_alloca(&mut self, ty: &'ll Type, len: &'ll Value, align: Align) -> &'ll Value {
464 unsafe {

Callers 1

allocaMethod · 0.80

Calls 1

unnamedFunction · 0.85

Tested by

no test coverage detected