diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2019-08-26 22:15:50 +0000 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2019-08-26 22:15:50 +0000 |
| commit | aeca56964f917e5e6faaf291dfd29f3875236ca0 (patch) | |
| tree | 605dc6d34d754627b80fc3f4570b757de8c6de5e /clang/lib/CodeGen/CodeGenFunction.cpp | |
| parent | 173a3a54bba06ffbf2b680cf52f1f8a257c33b15 (diff) | |
msan, codegen, instcombine: Keep more lifetime markers used for msan
Reviewers: eugenis
Subscribers: hiraditya, cfe-commits, #sanitizers, llvm-commits
Tags: #clang, #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D66695
llvm-svn: 369979
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 95b8fdce783c..228093044e14 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -47,13 +47,9 @@ static bool shouldEmitLifetimeMarkers(const CodeGenOptions &CGOpts, if (CGOpts.DisableLifetimeMarkers) return false; - // Disable lifetime markers in msan builds. - // FIXME: Remove this when msan works with lifetime markers. - if (LangOpts.Sanitize.has(SanitizerKind::Memory)) - return false; - - // Asan uses markers for use-after-scope checks. - if (CGOpts.SanitizeAddressUseAfterScope) + // Sanitizers may use markers. + if (CGOpts.SanitizeAddressUseAfterScope || + LangOpts.Sanitize.has(SanitizerKind::Memory)) return true; // For now, only in optimized builds. |
