forked from jeremy-rifkin/cpptrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.cpp
More file actions
41 lines (32 loc) · 1013 Bytes
/
options.cpp
File metadata and controls
41 lines (32 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <cpptrace/basic.hpp>
#include "options.hpp"
#include <atomic>
CPPTRACE_BEGIN_NAMESPACE
namespace detail {
std::atomic_bool absorb_trace_exceptions(true); // NOSONAR
std::atomic_bool resolve_inlined_calls(true); // NOSONAR
std::atomic<cache_mode> current_cache_mode(cache_mode::prioritize_speed); // NOSONAR
bool should_absorb_trace_exceptions() {
return absorb_trace_exceptions;
}
bool should_resolve_inlined_calls() {
return resolve_inlined_calls;
}
cache_mode get_cache_mode() {
return current_cache_mode;
}
}
CPPTRACE_END_NAMESPACE
CPPTRACE_BEGIN_NAMESPACE
void absorb_trace_exceptions(bool absorb) {
detail::absorb_trace_exceptions = absorb;
}
void enable_inlined_call_resolution(bool enable) {
detail::resolve_inlined_calls = enable;
}
namespace experimental {
void set_cache_mode(cache_mode mode) {
detail::current_cache_mode = mode;
}
}
CPPTRACE_END_NAMESPACE