summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_flags.h
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-01-06 02:44:05 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-01-06 02:44:05 +0000
commitbdbdd3fd4e79589b172ee41d4694b8b6a2d6da73 (patch)
tree632cf30c7d5f82c73c5dfbdb253db363cd4d3305 /compiler-rt/lib/sanitizer_common/sanitizer_flags.h
parenta872f3f67699177169a4531946af322ab64a3fc2 (diff)
downloadbcm5719-llvm-bdbdd3fd4e79589b172ee41d4694b8b6a2d6da73.tar.gz
bcm5719-llvm-bdbdd3fd4e79589b172ee41d4694b8b6a2d6da73.zip
[Sanitizer] Use COMMON_FLAG macro to describe common runtime flags.
Summary: Introduce a single place where we specify flag type, name, default value, and description. This removes a large amount of boilerplate and ensures we won't leave flags uninitialized. Test Plan: regression test suite Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6851 llvm-svn: 225239
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_flags.h')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_flags.h42
1 files changed, 3 insertions, 39 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_flags.h b/compiler-rt/lib/sanitizer_common/sanitizer_flags.h
index c39bb781723..9f0352a574e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_flags.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_flags.h
@@ -28,48 +28,12 @@ void ParseFlag(const char *env, const char **flag,
const char *name, const char *descr);
struct CommonFlags {
- bool symbolize;
- const char *external_symbolizer_path;
- bool allow_addr2line;
- const char *strip_path_prefix;
- bool fast_unwind_on_check;
- bool fast_unwind_on_fatal;
- bool fast_unwind_on_malloc;
- bool handle_ioctl;
- int malloc_context_size;
- const char *log_path;
- int verbosity;
- bool detect_leaks;
- bool leak_check_at_exit;
- bool allocator_may_return_null;
- bool print_summary;
- bool check_printf;
- bool handle_segv;
- bool allow_user_segv_handler;
- bool use_sigaltstack;
- bool detect_deadlocks;
- uptr clear_shadow_mmap_threshold;
- const char *color;
- bool legacy_pthread_cond;
- bool intercept_tls_get_addr;
- bool help;
- uptr mmap_limit_mb;
- uptr hard_rss_limit_mb;
- bool coverage;
- bool coverage_pcs;
- bool coverage_bitset;
- bool coverage_direct;
- const char *coverage_dir;
- bool full_address_space;
- const char *suppressions;
- bool print_suppressions;
- bool disable_coredump;
- bool symbolize_inline_frames;
- const char *stack_trace_format;
+#define COMMON_FLAG(Type, Name, DefaultValue, Description) Type Name;
+#include "sanitizer_flags.inc"
+#undef COMMON_FLAG
void SetDefaults();
void ParseFromString(const char *str);
-
void CopyFrom(const CommonFlags &other);
};
OpenPOWER on IntegriCloud