| ... | ... | @@ -311,7 +311,10 @@ ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machi |
| 311 | 311 | } |
| 312 | 312 | }); |
| 313 | 313 | |
| 314 | | pass_builder.registerOptimizerEarlyEPCallback([&](ModulePassManager &module_pm, OptimizationLevel OL) { |
| 314 | //pass_builder.registerOptimizerEarlyEPCallback([&](ModulePassManager &module_pm, OptimizationLevel OL) { |
| 315 | //}); |
| 316 | |
| 317 | pass_builder.registerOptimizerLastEPCallback([&](ModulePassManager &module_pm, OptimizationLevel level) { |
| 315 | 318 | // Code coverage instrumentation. |
| 316 | 319 | if (options.sancov) { |
| 317 | 320 | module_pm.addPass(SanitizerCoveragePass(getSanCovOptions(options.coverage))); |
| ... | ... | @@ -322,9 +325,7 @@ ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machi |
| 322 | 325 | module_pm.addPass(ModuleThreadSanitizerPass()); |
| 323 | 326 | module_pm.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass())); |
| 324 | 327 | } |
| 325 | | }); |
| 326 | 328 | |
| 327 | | pass_builder.registerOptimizerLastEPCallback([&](ModulePassManager &module_pm, OptimizationLevel level) { |
| 328 | 329 | // Verify the output |
| 329 | 330 | if (assertions_on) { |
| 330 | 331 | module_pm.addPass(VerifierPass()); |