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

Method alloca

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

Source from the content-addressed store, hash-verified

445 }
446
447 fn alloca(&mut self, ty: &'ll Type, align: Align) -> &'ll Value {
448 trace!("Alloca `{:?}`", ty);
449 let mut bx = Builder::with_cx(self.cx);
450 bx.position_at_start(unsafe { llvm::LLVMGetFirstBasicBlock(self.llfn()) });
451 bx.dynamic_alloca(ty, align)
452 }
453
454 fn dynamic_alloca(&mut self, ty: &'ll Type, align: Align) -> &'ll Value {
455 trace!("Dynamic Alloca `{:?}`", ty);

Callers 1

storeMethod · 0.80

Calls 3

position_at_startMethod · 0.80
llfnMethod · 0.80
dynamic_allocaMethod · 0.80

Tested by

no test coverage detected