(
cgcx: &CodegenContext<NvvmCodegenBackend>,
thin_module: &mut ThinModule<NvvmCodegenBackend>,
)
| 147 | } |
| 148 | |
| 149 | pub(crate) unsafe fn optimize_thin( |
| 150 | cgcx: &CodegenContext<NvvmCodegenBackend>, |
| 151 | thin_module: &mut ThinModule<NvvmCodegenBackend>, |
| 152 | ) -> Result<ModuleCodegen<LlvmMod>, FatalError> { |
| 153 | // essentially does nothing |
| 154 | let diag_handler = cgcx.create_diag_handler(); |
| 155 | let module_name = &thin_module.shared.module_names[thin_module.idx]; |
| 156 | |
| 157 | let llcx = llvm::LLVMRustContextCreate(cgcx.fewer_names); |
| 158 | let llmod = parse_module(llcx, module_name, thin_module.data(), &diag_handler)? as *const _; |
| 159 | |
| 160 | let module = ModuleCodegen { |
| 161 | module_llvm: LlvmMod { llmod, llcx }, |
| 162 | name: thin_module.name().to_string(), |
| 163 | kind: ModuleKind::Regular, |
| 164 | }; |
| 165 | Ok(module) |
| 166 | } |
| 167 | |
| 168 | pub(crate) fn parse_module<'a>( |
| 169 | cx: &'a llvm::Context, |
no test coverage detected