[compiler-rt] r223909 - [DD] Don't store the second copy of CommonFlags inside DDFlags.
Alexey Samsonov
vonosmas at gmail.com
Tue Dec 9 18:30:04 PST 2014
Author: samsonov
Date: Tue Dec 9 20:30:04 2014
New Revision: 223909
URL: http://llvm.org/viewvc/llvm-project?rev=223909&view=rev
Log:
[DD] Don't store the second copy of CommonFlags inside DDFlags.
Modified:
compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc
compiler-rt/trunk/lib/tsan/dd/dd_rtl.h
Modified: compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc?rev=223909&r1=223908&r2=223909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc Tue Dec 9 20:30:04 2014
@@ -70,16 +70,14 @@ void InitializeFlags(Flags *f, const cha
// 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());
}
Modified: compiler-rt/trunk/lib/tsan/dd/dd_rtl.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/dd/dd_rtl.h?rev=223909&r1=223908&r2=223909&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/dd/dd_rtl.h (original)
+++ compiler-rt/trunk/lib/tsan/dd/dd_rtl.h Tue Dec 9 20:30:04 2014
@@ -18,8 +18,7 @@
namespace __dsan {
-struct Flags : CommonFlags, DDFlags {
-};
+typedef DDFlags Flags;
struct Mutex {
DDMutex dd;
More information about the llvm-commits
mailing list