Skip to content

Commit

Permalink
[Codegen] Adapt ModuleAddressSanitizerPass/ModuleSanitizerCoveragePas…
Browse files Browse the repository at this point in the history
…s renaming (halide#6996)

llvm/llvm-project@93600eb
renamed ModuleAddressSanitizerPass to AddressSanitizerPass.
llvm/llvm-project@4c18670
renamed ModuleSanitizerCoveragePass.
  • Loading branch information
MaskRay authored and ardier committed Mar 3, 2024
1 parent 57ef645 commit 97242b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/CodeGen_LLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,11 @@ void CodeGen_LLVM::optimize_module() {
if (get_target().os == Target::OS::Linux) {
sanitizercoverage_options.StackDepth = true;
}
#if LLVM_VERSION >= 160
mpm.addPass(SanitizerCoveragePass(sanitizercoverage_options));
#else
mpm.addPass(ModuleSanitizerCoveragePass(sanitizercoverage_options));
#endif
});
}

Expand All @@ -1185,8 +1189,13 @@ void CodeGen_LLVM::optimize_module() {
constexpr bool use_global_gc = false;
constexpr bool use_odr_indicator = true;
constexpr auto destructor_kind = AsanDtorKind::Global;
#if LLVM_VERSION >= 160
mpm.addPass(AddressSanitizerPass(
asan_options, use_global_gc, use_odr_indicator, destructor_kind));
#else
mpm.addPass(ModuleAddressSanitizerPass(
asan_options, use_global_gc, use_odr_indicator, destructor_kind));
#endif
#else
constexpr bool compile_kernel = false;
constexpr bool recover = false;
Expand Down

0 comments on commit 97242b8

Please sign in to comment.