diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-01-02 09:59:38 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-01-02 09:59:38 +0000 |
commit | ee2d9890ccbda9ef229eeacc8ede3dd365284f4c (patch) | |
tree | 61127c2352ab74528d01fcbf2853ece9ada6eec3 /lib/sanitizer_common/sanitizer_flags.h | |
parent | 45f2ae8d28fc3cfc5d7f1da604fa620c3e09a809 (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/sanitizer_common/sanitizer_flags.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_flags.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.h b/lib/sanitizer_common/sanitizer_flags.h index 8718089ae..f71cf43b2 100644 --- a/lib/sanitizer_common/sanitizer_flags.h +++ b/lib/sanitizer_common/sanitizer_flags.h @@ -73,7 +73,7 @@ struct CommonFlags { // Functions to get/set global CommonFlags shared by all sanitizer runtimes: extern CommonFlags common_flags_dont_use; -inline const CommonFlags *common_flags() { +inline CommonFlags *common_flags() { return &common_flags_dont_use; } @@ -84,16 +84,6 @@ inline void SetCommonFlagsDefaults() { inline void ParseCommonFlagsFromString(const char *str) { common_flags_dont_use.ParseFromString(str); } - -// This function can only be used to setup tool-specific overrides for -// CommonFlags defaults. Generally, it should only be used right after -// SetCommonFlagsDefaults(), but before ParseCommonFlagsFromString(), and -// only during the flags initialization (i.e. before they are used for -// the first time). -inline void OverrideCommonFlags(const CommonFlags &cf) { - common_flags_dont_use = cf; -} - void PrintFlagDescriptions(); } // namespace __sanitizer |