File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 197
197
- On Linux, setting a long backend thread name now truncates it instead of
198
198
failing. ([ #691 ] ( https://github.com/odygrd/quill/issues/691 ) )
199
199
- Fixed BSD builds. ([ #688 ] ( https://github.com/odygrd/quill/issues/688 ) )
200
+ - Fixed ` QUILL_ATTRIBUTE_HOT ` and ` QUILL_ATTRIBUTE_COLD ` clang detection
200
201
- CMake improvements: switched to range syntax for minimum required version and bumped minimum required CMake version to
201
202
` 3.12 ` . ([ #686 ] ( https://github.com/odygrd/quill/issues/686 ) )
202
203
- Correct the installation location of pkg-config files. They are now properly placed in ` /usr/local/lib ` .
Original file line number Diff line number Diff line change 67
67
* Portable maybe_unused
68
68
*/
69
69
#ifndef QUILL_MAYBE_UNUSED
70
- #if QUILL_HAS_CPP_ATTRIBUTE(maybe_unused) && (defined(_HAS_CXX17) && _HAS_CXX17 == 1 )
70
+ #if QUILL_HAS_CPP_ATTRIBUTE(maybe_unused) && (__cplusplus >= 201703L )
71
71
#define QUILL_MAYBE_UNUSED [[maybe_unused]]
72
- #elif QUILL_HAS_ATTRIBUTE(__unused__) || defined(__GNUC__)
72
+ #elif QUILL_HAS_ATTRIBUTE(__unused__)
73
73
#define QUILL_MAYBE_UNUSED __attribute__ ((__unused__))
74
74
#elif defined (_MSC_VER)
75
75
#define QUILL_MAYBE_UNUSED __pragma (warning(suppress : 4100 ))
85
85
* is likely to be not-taken.
86
86
*/
87
87
#ifndef QUILL_ATTRIBUTE_HOT
88
- #if QUILL_HAS_ATTRIBUTE(hot) || (defined(__GNUC__) && !defined(__clang__))
88
+ #if QUILL_HAS_ATTRIBUTE(hot)
89
89
#define QUILL_ATTRIBUTE_HOT __attribute__ ((hot))
90
90
#else
91
91
#define QUILL_ATTRIBUTE_HOT
92
92
#endif
93
93
#endif
94
94
95
95
#ifndef QUILL_ATTRIBUTE_COLD
96
- #if QUILL_HAS_ATTRIBUTE(cold) || (defined(__GNUC__) && !defined(__clang__))
96
+ #if QUILL_HAS_ATTRIBUTE(cold)
97
97
#define QUILL_ATTRIBUTE_COLD __attribute__ ((cold))
98
98
#else
99
99
#define QUILL_ATTRIBUTE_COLD
104
104
* Used
105
105
*/
106
106
#ifndef QUILL_ATTRIBUTE_USED
107
- #if QUILL_HAS_ATTRIBUTE(used) || defined(__GNUC__) || defined(__clang__)
107
+ #if QUILL_HAS_ATTRIBUTE(used)
108
108
#define QUILL_ATTRIBUTE_USED __attribute__ ((used))
109
109
#else
110
110
#define QUILL_ATTRIBUTE_USED
You can’t perform that action at this time.
0 commit comments