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 dacfa24f75, 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.
This commit is contained in:
Matthias Krüger 2022-06-28 18:34:35 +02:00 committed by GitHub
commit db872ee1b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,