[PATCH] D26354: Use -fsanitize-recover instead of -mllvm -msan-keep-going: clang.
Aleksey Shlyapnikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 10:22:29 PST 2016
alekseyshl created this revision.
alekseyshl added a reviewer: eugenis.
alekseyshl added a subscriber: cfe-commits.
Use -fsanitize-recover instead of -mllvm -msan-keep-going: pass -fsanitize-recover value to msan.
https://reviews.llvm.org/D26354
Files:
lib/CodeGen/BackendUtil.cpp
Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp
+++ lib/CodeGen/BackendUtil.cpp
@@ -200,7 +200,9 @@
const PassManagerBuilderWrapper &BuilderWrapper =
static_cast<const PassManagerBuilderWrapper&>(Builder);
const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts();
- PM.add(createMemorySanitizerPass(CGOpts.SanitizeMemoryTrackOrigins));
+ int TrackOrigins = CGOpts.SanitizeMemoryTrackOrigins;
+ bool Recover = CGOpts.SanitizeRecover.has(SanitizerKind::Memory);
+ PM.add(createMemorySanitizerPass(TrackOrigins, Recover));
// MemorySanitizer inserts complex instrumentation that mostly follows
// the logic of the original code, but operates on "shadow" values.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26354.77056.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161107/5052c0f4/attachment.bin>
More information about the cfe-commits
mailing list