diff options
| author | Krasimir Georgiev <krasimir@google.com> | 2022-06-28 14:08:35 +0000 |
|---|---|---|
| committer | Krasimir Georgiev <krasimir@google.com> | 2022-06-28 14:08:35 +0000 |
| commit | fe02ee8be97fc94166e3920d16d550bd6994fabd (patch) | |
| tree | d6cb59065880cf9bf927e3e687dbf3bc08824c82 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | baf382e63c023259fa1f9042f8f479f183ca6ed3 (diff) | |
| download | rust-fe02ee8be97fc94166e3920d16d550bd6994fabd.tar.gz rust-fe02ee8be97fc94166e3920d16d550bd6994fabd.zip | |
llvm-wrapper: adapt for an LLVM API change
This adapts llvm-wrapper for https://github.com/llvm/llvm-project/commit/dacfa24f75c328ae30b710ecadaa18e4ba10cdc6, which removed ASanGlobalsMetadataAnalysis.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 2 |
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, |
