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

Method ret

crates/rustc_codegen_nvvm/src/builder.rs:214–224  ·  view source on GitHub ↗
(&mut self, mut v: &'ll Value)

Source from the content-addressed store, hash-verified

212 }
213
214 fn ret(&mut self, mut v: &'ll Value) {
215 trace!("Ret `{:?}`", v);
216 unsafe {
217 let ty = LLVMRustGetValueType(v);
218 let (new_ty, changed) = get_transformed_type(self.cx, ty);
219 if changed {
220 v = crate::int_replace::transmute_llval(self.llbuilder, self.cx, v, new_ty);
221 }
222 llvm::LLVMBuildRet(self.llbuilder, v);
223 }
224 }
225
226 fn br(&mut self, dest: &'ll BasicBlock) {
227 trace!("Br");

Callers 1

override_libm_functionFunction · 0.80

Calls 3

LLVMRustGetValueTypeFunction · 0.85
get_transformed_typeFunction · 0.85
transmute_llvalFunction · 0.85

Tested by

no test coverage detected