llvm-wrapper: adapt for an LLVM API change

This adapts llvm-wrapper for
dacfa24f75,
which removed ASanGlobalsMetadataAnalysis.
This commit is contained in:
Krasimir Georgiev 2022-06-28 14:08:35 +00:00
parent baf382e63c
commit fe02ee8be9

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,