diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-12-10 02:30:04 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-12-10 02:30:04 +0000 |
commit | 4f9b2b21067ce765836cb6cd0755dc383c179d09 (patch) | |
tree | 073b5bcfa6938a979bd994a9ad79f62327ac564a /lib/tsan/dd | |
parent | fc012497d1404989fb4b4afc82b2a4f00d6b0bca (diff) | |
download | compiler-rt-4f9b2b21067ce765836cb6cd0755dc383c179d09.tar.gz |
[DD] Don't store the second copy of CommonFlags inside DDFlags.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/dd')
-rw-r--r-- | lib/tsan/dd/dd_rtl.cc | 11 | ||||
-rw-r--r-- | lib/tsan/dd/dd_rtl.h | 3 |
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/tsan/dd/dd_rtl.cc b/lib/tsan/dd/dd_rtl.cc index 44de617e9..41b75bf75 100644 --- a/lib/tsan/dd/dd_rtl.cc +++ b/lib/tsan/dd/dd_rtl.cc @@ -70,16 +70,14 @@ void InitializeFlags(Flags *f, const char *env) { // Default values. f->second_deadlock_stack = false; - SetCommonFlagsDefaults(f); + CommonFlags *cf = common_flags(); + SetCommonFlagsDefaults(cf); // Override some common flags defaults. - f->allow_addr2line = true; + cf->allow_addr2line = true; // Override from command line. ParseFlag(env, &f->second_deadlock_stack, "second_deadlock_stack", ""); - ParseCommonFlagsFromString(f, env); - - // Copy back to common flags. - *common_flags() = *f; + ParseCommonFlagsFromString(cf, env); } void Initialize() { @@ -88,7 +86,6 @@ void Initialize() { InitializeInterceptors(); InitializeFlags(flags(), GetEnv("DSAN_OPTIONS")); - common_flags()->symbolize = true; ctx->dd = DDetector::Create(flags()); } diff --git a/lib/tsan/dd/dd_rtl.h b/lib/tsan/dd/dd_rtl.h index ec777665d..bb1b20205 100644 --- a/lib/tsan/dd/dd_rtl.h +++ b/lib/tsan/dd/dd_rtl.h @@ -18,8 +18,7 @@ namespace __dsan { -struct Flags : CommonFlags, DDFlags { -}; +typedef DDFlags Flags; struct Mutex { DDMutex dd; |