Skip to content

Commit b377867

Browse files
authored
Fix compiler warning when using slang.h with gcc/clang on Windows (#5766)
The macros SLANG_NO_INLINE, SLANG_FORCE_INLINE, SLANG_BREAKPOINT and SLANG_ALIGN_OF end up getting defined twice when using g++ or clang++ with the slang.h header on Windows. Change the VC specific definitions to depend on SLANG_VC instead of SLANG_MICROSOFT_FAMILY.
1 parent bd50f99 commit b377867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/slang.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ convention for interface methods.
273273
#endif
274274

275275
// Microsoft VC specific
276-
#if SLANG_MICROSOFT_FAMILY
276+
#if SLANG_VC
277277
#define SLANG_NO_INLINE __declspec(noinline)
278278
#define SLANG_FORCE_INLINE __forceinline
279279
#define SLANG_BREAKPOINT(id) __debugbreak();

0 commit comments

Comments
 (0)