From 175625c8b8b1c535a8438e136903604584798c8d Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Thu, 14 Sep 2017 23:53:56 +0000 Subject: [PATCH] [MSan] Specify use-after-dtor default value in header. llvm-svn: 313319 --- clang/lib/Driver/SanitizerArgs.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index bf8d062..5d06f8c 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -491,9 +491,11 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, MsanUseAfterDtor = Args.hasFlag(options::OPT_fsanitize_memory_use_after_dtor, options::OPT_fno_sanitize_memory_use_after_dtor, - false); + MsanUseAfterDtor); NeedPIE |= !(TC.getTriple().isOSLinux() && TC.getTriple().getArch() == llvm::Triple::x86_64); + } else { + MsanUseAfterDtor = false; } if (AllAddedKinds & Thread) { -- 2.7.4