mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Added preprocessor checks for Clang on Windows
- MSVC-specific code is used in some places and compiled only if _MSC_VER is set; however, Clang under Windows also defines this, which reports errors on this non-standard code if the -pedantic-errors compiler flag is set
This commit is contained in:
parent
a2dd51ae4c
commit
cef21ef035
@ -110,7 +110,7 @@ struct ThreadNameData
|
|||||||
std::atomic<ThreadNameData*>& GetThreadNameData();
|
std::atomic<ThreadNameData*>& GetThreadNameData();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined _MSC_VER && !defined __clang__
|
||||||
# pragma pack( push, 8 )
|
# pragma pack( push, 8 )
|
||||||
struct THREADNAME_INFO
|
struct THREADNAME_INFO
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ TRACY_API void SetThreadName( const char* name )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
# if defined _MSC_VER
|
# if defined _MSC_VER && !defined __clang__
|
||||||
THREADNAME_INFO info;
|
THREADNAME_INFO info;
|
||||||
info.dwType = 0x1000;
|
info.dwType = 0x1000;
|
||||||
info.szName = name;
|
info.szName = name;
|
||||||
|
@ -128,11 +128,11 @@
|
|||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
#ifndef LZ4_FORCE_INLINE
|
#ifndef LZ4_FORCE_INLINE
|
||||||
# ifdef _MSC_VER /* Visual Studio */
|
# if defined (_MSC_VER) && !defined (__clang__) /* MSVC */
|
||||||
# define LZ4_FORCE_INLINE static __forceinline
|
# define LZ4_FORCE_INLINE static __forceinline
|
||||||
# else
|
# else
|
||||||
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
|
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
|
||||||
# ifdef __GNUC__
|
# if defined (__GNUC__) || defined (__clang__)
|
||||||
# define LZ4_FORCE_INLINE static inline __attribute__((always_inline))
|
# define LZ4_FORCE_INLINE static inline __attribute__((always_inline))
|
||||||
# else
|
# else
|
||||||
# define LZ4_FORCE_INLINE static inline
|
# define LZ4_FORCE_INLINE static inline
|
||||||
|
Loading…
Reference in New Issue
Block a user