summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_flags.cc
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-01-02 09:59:38 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-01-02 09:59:38 +0000
commitee2d9890ccbda9ef229eeacc8ede3dd365284f4c (patch)
tree61127c2352ab74528d01fcbf2853ece9ada6eec3 /lib/tsan/rtl/tsan_flags.cc
parent45f2ae8d28fc3cfc5d7f1da604fa620c3e09a809 (diff)
Revert r224736: "[Sanitizer] Make CommonFlags immutable after initialization."
We've got some internal users that either aren't compatible with this or have found a bug with it. Either way, this is an isolated cleanup and so I'm reverting it to un-block folks while we investigate. Alexey and I will be working on fixing everything up so this can be re-committed soon. Sorry for the noise and any inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_flags.cc')
-rw-r--r--lib/tsan/rtl/tsan_flags.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/tsan/rtl/tsan_flags.cc b/lib/tsan/rtl/tsan_flags.cc
index 70fa1808a..ec74a24b0 100644
--- a/lib/tsan/rtl/tsan_flags.cc
+++ b/lib/tsan/rtl/tsan_flags.cc
@@ -93,16 +93,13 @@ void InitializeFlags(Flags *f, const char *env) {
// DDFlags
f->second_deadlock_stack = false;
+ CommonFlags *cf = common_flags();
SetCommonFlagsDefaults();
- {
- // Override some common flags defaults.
- CommonFlags cf = *common_flags();
- cf.allow_addr2line = true;
- cf.detect_deadlocks = true;
- cf.print_suppressions = false;
- cf.stack_trace_format = " #%n %f %S %M";
- OverrideCommonFlags(cf);
- }
+ // Override some common flags defaults.
+ cf->allow_addr2line = true;
+ cf->detect_deadlocks = true;
+ cf->print_suppressions = false;
+ cf->stack_trace_format = " #%n %f %S %M";
// Let a frontend override.
ParseFlags(f, __tsan_default_options());
@@ -118,8 +115,7 @@ void InitializeFlags(Flags *f, const char *env) {
f->report_signal_unsafe = false;
}
- if (common_flags()->help)
- PrintFlagDescriptions();
+ if (cf->help) PrintFlagDescriptions();
if (f->history_size < 0 || f->history_size > 7) {
Printf("ThreadSanitizer: incorrect value for history_size"