From 8bb699b511904af2acc7188db146f29da94022da Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Wed, 7 Jan 2015 00:38:00 +0000 Subject: [Sanitizer] Change the runtime flag representation. This mirrors r225239 to all the rest sanitizers: ASan, DFSan, LSan, MSan, TSan, UBSan. Now the runtime flag type, name, default value and description is located in the single place in the .inc file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225327 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/dfsan/dfsan.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'lib/dfsan/dfsan.h') diff --git a/lib/dfsan/dfsan.h b/lib/dfsan/dfsan.h index bc38be08c..8f242197f 100644 --- a/lib/dfsan/dfsan.h +++ b/lib/dfsan/dfsan.h @@ -56,17 +56,12 @@ inline const dfsan_label *shadow_for(const void *ptr) { } struct Flags { - // Whether to warn on unimplemented functions. - bool warn_unimplemented; - // Whether to warn on non-zero labels. - bool warn_nonzero_labels; - // Whether to propagate labels only when there is an obvious data dependency - // (e.g., when comparing strings, ignore the fact that the output of the - // comparison might be data-dependent on the content of the strings). This - // applies only to the custom functions defined in 'custom.c'. - bool strict_data_dependencies; - // The path of the file where to dump the labels when the program terminates. - const char* dump_labels_at_exit; +#define DFSAN_FLAG(Type, Name, DefaultValue, Description) Type Name; +#include "dfsan_flags.inc" +#undef DFSAN_FLAG + + void SetDefaults(); + void ParseFromString(const char *str); }; extern Flags flags_data; -- cgit v1.2.3