Skip to content

Commit 7d813ec

Browse files
authored
Merge pull request wolfpld#733 from Razakhel/fix-clang-pedantic-windows
Added preprocessor checks for Clang on Windows
2 parents 9ccc754 + cef21ef commit 7d813ec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

public/common/TracySystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct ThreadNameData
110110
std::atomic<ThreadNameData*>& GetThreadNameData();
111111
#endif
112112

113-
#ifdef _MSC_VER
113+
#if defined _MSC_VER && !defined __clang__
114114
# pragma pack( push, 8 )
115115
struct THREADNAME_INFO
116116
{
@@ -149,7 +149,7 @@ TRACY_API void SetThreadName( const char* name )
149149
}
150150
else
151151
{
152-
# if defined _MSC_VER
152+
# if defined _MSC_VER && !defined __clang__
153153
THREADNAME_INFO info;
154154
info.dwType = 0x1000;
155155
info.szName = name;

public/common/tracy_lz4.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@
128128
#endif /* _MSC_VER */
129129

130130
#ifndef LZ4_FORCE_INLINE
131-
# ifdef _MSC_VER /* Visual Studio */
131+
# if defined (_MSC_VER) && !defined (__clang__) /* MSVC */
132132
# define LZ4_FORCE_INLINE static __forceinline
133133
# else
134134
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
135-
# ifdef __GNUC__
135+
# if defined (__GNUC__) || defined (__clang__)
136136
# define LZ4_FORCE_INLINE static inline __attribute__((always_inline))
137137
# else
138138
# define LZ4_FORCE_INLINE static inline

0 commit comments

Comments
 (0)