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:
Razakhel
2024-02-21 22:54:44 +01:00
parent a2dd51ae4c
commit cef21ef035
2 changed files with 4 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ struct ThreadNameData
std::atomic<ThreadNameData*>& GetThreadNameData();
#endif
#ifdef _MSC_VER
#if defined _MSC_VER && !defined __clang__
# pragma pack( push, 8 )
struct THREADNAME_INFO
{
@@ -149,7 +149,7 @@ TRACY_API void SetThreadName( const char* name )
}
else
{
# if defined _MSC_VER
# if defined _MSC_VER && !defined __clang__
THREADNAME_INFO info;
info.dwType = 0x1000;
info.szName = name;