Skip to content

Commit

Permalink
[Codegen] Adapt ModuleAddressSanitizerPass renaming
Browse files Browse the repository at this point in the history
llvm/llvm-project@93600eb
renamed ModuleAddressSanitizerPass to AddressSanitizerPass.
  • Loading branch information
MaskRay committed Sep 7, 2022
1 parent cbe2e63 commit b668fa2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CodeGen_LLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,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 b668fa2

Please sign in to comment.