summaryrefslogtreecommitdiff
path: root/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
commit0dd5cceeb8e82c587b9a8fae00f515013ce0bfa1 (patch)
tree22e728f662f43140d7f6acfab4fe39b787810e58 /lib/sanitizer_common/sanitizer_flags.h
parent45b058e6446157c88516721dd27200eaca54b705 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.h')
-rw-r--r--lib/sanitizer_common/sanitizer_flags.h42
1 files changed, 3 insertions, 39 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.h b/lib/sanitizer_common/sanitizer_flags.h
index c39bb7817..9f0352a57 100644
--- a/lib/sanitizer_common/sanitizer_flags.h
+++ b/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);
};