summaryrefslogtreecommitdiff
path: root/lib/dfsan/dfsan.h
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-01-07 00:38:00 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-01-07 00:38:00 +0000
commit8bb699b511904af2acc7188db146f29da94022da (patch)
tree8d6072816a80284eb43e5499cd10f23afa604fcf /lib/dfsan/dfsan.h
parentdf867df2d3da7451984333ebcb6b4040dbcda164 (diff)
[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
Diffstat (limited to 'lib/dfsan/dfsan.h')
-rw-r--r--lib/dfsan/dfsan.h17
1 files changed, 6 insertions, 11 deletions
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;