about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-06-28 18:34:35 +0200
committerGitHub <noreply@github.com>2022-06-28 18:34:35 +0200
commitdb872ee1b8a6f8a598eb6cdadd1fc9d4cab374f0 (patch)
tree3390a0cab464cafea12a69fd2d398c6e7752784b /compiler/rustc_llvm/llvm-wrapper
parent62a787c595981a24b145e8e80d9b5ed889f0de74 (diff)
parentfe02ee8be97fc94166e3920d16d550bd6994fabd (diff)
downloadrust-db872ee1b8a6f8a598eb6cdadd1fc9d4cab374f0.tar.gz
rust-db872ee1b8a6f8a598eb6cdadd1fc9d4cab374f0.zip
Rollup merge of #98621 - krasimirgg:llvm-15-wrapper, r=nikic
llvm-wrapper: adapt for removal of the ASanGlobalsMetadataAnalysis LLVM API

No functional changes intended.

This adapts llvm-wrapper for https://github.com/llvm/llvm-project/commit/dacfa24f75c328ae30b710ecadaa18e4ba10cdc6, which removed `ASanGlobalsMetadataAnalysis`.

Found via our experimental rust + HEAD llvm bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/11565#0181a72f-75bb-4378-88f0-4c0bca7d03fa/231-505.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 38fddbdba54..0f4973ebf71 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -985,7 +985,9 @@ LLVMRustOptimizeWithNewPassManager(
     if (SanitizerOptions->SanitizeAddress) {
       OptimizerLastEPCallbacks.push_back(
         [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
+#if LLVM_VERSION_LT(15, 0)
           MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
+#endif
 #if LLVM_VERSION_GE(14, 0)
           AddressSanitizerOptions opts = AddressSanitizerOptions{
             /*CompileKernel=*/false,