diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-10-15 12:25:29 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-10-15 12:25:29 +0000 |
commit | b48c2b2072c8cc17dc1579a6b20ce6c2a575821d (patch) | |
tree | 727a3818c4aa133984e5753e7da6330b31844fc9 /lib/sanitizer_common/sanitizer_flags.h | |
parent | e910a1630be10685b2985a383c1a012f5df6bf62 (diff) |
tsan: use sanitizer::CommonFlags in tsan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_flags.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.h b/lib/sanitizer_common/sanitizer_flags.h index 43632e65c..7740b240f 100644 --- a/lib/sanitizer_common/sanitizer_flags.h +++ b/lib/sanitizer_common/sanitizer_flags.h @@ -37,7 +37,9 @@ struct CommonFlags { bool handle_ioctl; // Max number of stack frames kept for each allocation/deallocation. int malloc_context_size; - // Write logs to "log_path.pid" instead of stderr. + // Write logs to "log_path.pid". + // The special values are "stdout" and "stderr". + // The default is "stderr". const char *log_path; // Enable memory leak detection. bool detect_leaks; @@ -49,10 +51,9 @@ struct CommonFlags { bool allocator_may_return_null; }; -extern CommonFlags common_flags_dont_use_directly; - inline CommonFlags *common_flags() { - return &common_flags_dont_use_directly; + static CommonFlags f; + return &f; } void ParseCommonFlagsFromString(const char *str); |