[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 11:06:34 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rC321203: [hwasan] Implement -fsanitize-recover=hwaddress. (authored by eugenis, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41417?vs=127642&id=127760#toc

Repository:
  rC Clang

https://reviews.llvm.org/D41417

Files:
  lib/CodeGen/BackendUtil.cpp


Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp
+++ lib/CodeGen/BackendUtil.cpp
@@ -239,7 +239,11 @@
 
 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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41417.127760.patch
Type: text/x-patch
Size: 762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171220/3512cc41/attachment.bin>


More information about the llvm-commits mailing list