diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:08:34 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:08:34 +0000 |
commit | 13ddaa8416c02b81fbab9357336f4e70624b7652 (patch) | |
tree | 7a0f6b255a547001b88203525cf7cd0e399acdf9 /contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp | |
parent | da09e106efc76da569f2bad3d59b6b19b503bf39 (diff) | |
parent | 6252156da5066bd47f63f8bd40404d1f89909d32 (diff) |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp b/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp index 2c033e0f7c02..e2349da5f0a4 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp @@ -239,7 +239,11 @@ static void addKernelAddressSanitizerPasses(const PassManagerBuilder &Builder, static void addHWAddressSanitizerPasses(const PassManagerBuilder &Builder, legacy::PassManagerBase &PM) { - PM.add(createHWAddressSanitizerPass()); + const PassManagerBuilderWrapper &BuilderWrapper = + static_cast<const PassManagerBuilderWrapper &>(Builder); + const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts(); + bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::HWAddress); + PM.add(createHWAddressSanitizerPass(Recover)); } static void addMemorySanitizerPass(const PassManagerBuilder &Builder, |