[PATCH] [Sanitizer] Make CommonFlags immutable after initialization.

Alexey Samsonov vonosmas at gmail.com
Fri Dec 19 17:13:51 PST 2014


================
Comment at: lib/sanitizer_common/sanitizer_flags.h:91
@@ +90,3 @@
+// time).
+#define OVERRIDE_COMMON_FLAG(flag, value) \
+    common_flags_dont_use.flag = value
----------------
kcc wrote:
> Macro in a header file? You got to be kidding. 
Replaced it with "OverrideCommonFlags()" function. Unfortunately, we can't atomically switch common_flags_dont_use singleton during tool initialization, and have to gradually update it by calls to SetCommonFlagsDefaults(), OverrideCommonFlags() and ParseCommonFlagsFromString().

http://reviews.llvm.org/D6741

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list