Skip to content

Commit fe02ee8

Browse files
committed
llvm-wrapper: adapt for an LLVM API change
This adapts llvm-wrapper for llvm/llvm-project@dacfa24, which removed ASanGlobalsMetadataAnalysis.
1 parent baf382e commit fe02ee8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,9 @@ LLVMRustOptimizeWithNewPassManager(
985985
if (SanitizerOptions->SanitizeAddress) {
986986
OptimizerLastEPCallbacks.push_back(
987987
[SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
988+
#if LLVM_VERSION_LT(15, 0)
988989
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
990+
#endif
989991
#if LLVM_VERSION_GE(14, 0)
990992
AddressSanitizerOptions opts = AddressSanitizerOptions{
991993
/*CompileKernel=*/false,

0 commit comments

Comments
 (0)