Skip to content

Commit

Permalink
Fix for top-of-tree LLVM (halide#6825)
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson authored and ardier committed Mar 3, 2024
1 parent 86f0f3c commit c57bf65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CodeGen_LLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1168,9 +1168,13 @@ void CodeGen_LLVM::optimize_module() {
}

if (get_target().has_feature(Target::ASAN)) {
#if LLVM_VERSION >= 150
// Nothing, ASanGlobalsMetadataAnalysis no longer exists
#else
pb.registerPipelineStartEPCallback([&](ModulePassManager &mpm, OptimizationLevel) {
mpm.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, llvm::Module>());
});
#endif
pb.registerPipelineStartEPCallback([](ModulePassManager &mpm, OptimizationLevel) {
#if LLVM_VERSION >= 140
AddressSanitizerOptions asan_options; // default values are good...
Expand Down

0 comments on commit c57bf65

Please sign in to comment.