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 | df48533d4a3a2acf1280ec37a9f369efc468cbf2 (patch) | |
| tree | 8468ababd38f5aa7f80d848d32034e359a4596f1 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | eff099ee1875d8503bec7f952e84e3d19e939956 (diff) | |
| download | clang-df48533d4a3a2acf1280ec37a9f369efc468cbf2.tar.gz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 95b8fdce78..228093044e 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/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. |
