This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/rustc_llvm/llvm-wrapper Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -936,12 +936,14 @@ LLVMRustOptimizeWithNewPassManager(
936936 /* CompileKernel=*/ false );
937937 OptimizerLastEPCallbacks.push_back (
938938 [Options](ModulePassManager &MPM, OptimizationLevel Level) {
939- #if LLVM_VERSION_GE(14, 0)
939+ #if LLVM_VERSION_GE(14, 0) && LLVM_VERSION_LT(16, 0)
940940 MPM.addPass (ModuleMemorySanitizerPass (Options));
941941#else
942942 MPM.addPass (MemorySanitizerPass (Options));
943943#endif
944+ #if LLVM_VERSION_LT(16, 0)
944945 MPM.addPass (createModuleToFunctionPassAdaptor (MemorySanitizerPass (Options)));
946+ #endif
945947 }
946948 );
947949 }
@@ -972,7 +974,11 @@ LLVMRustOptimizeWithNewPassManager(
972974 /* UseAfterScope=*/ true ,
973975 AsanDetectStackUseAfterReturnMode::Runtime,
974976 };
977+ #if LLVM_VERSION_LT(16, 0)
975978 MPM.addPass (ModuleAddressSanitizerPass (opts));
979+ #else
980+ MPM.addPass (AddressSanitizerPass (opts));
981+ #endif
976982#else
977983 MPM.addPass (ModuleAddressSanitizerPass (
978984 /* CompileKernel=*/ false , SanitizerOptions->SanitizeAddressRecover ));
You can’t perform that action at this time.
0 commit comments