mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
Cleared up some overlap between the JUCE_CLANG and JUCE_GCC flags
This commit is contained in:
parent
00d98c991d
commit
876b4ae1d3
8 changed files with 10 additions and 11 deletions
|
|
@ -315,7 +315,7 @@ inline static int highestBitInInt (uint32 n) noexcept
|
|||
{
|
||||
jassert (n != 0); // (the built-in functions may not work for n = 0)
|
||||
|
||||
#if JUCE_GCC
|
||||
#if JUCE_GCC || JUCE_CLANG
|
||||
return 31 - __builtin_clz (n);
|
||||
#elif JUCE_USE_MSVC_INTRINSICS
|
||||
unsigned long highest;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ private:
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#elif (JUCE_GCC || JUCE_CLANG) && ! JUCE_MSVC
|
||||
#elif JUCE_GCC || JUCE_CLANG
|
||||
#define JUCE_ATOMICS_GCC 1 // GCC with intrinsics
|
||||
|
||||
#if JUCE_IOS || JUCE_ANDROID // (64-bit ops will compile but not link on these mobile OSes)
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ inline uint32 ByteOrder::swap (uint32 n) noexcept
|
|||
{
|
||||
#if JUCE_MAC || JUCE_IOS
|
||||
return OSSwapInt32 (n);
|
||||
#elif JUCE_GCC && JUCE_INTEL && ! JUCE_NO_INLINE_ASM
|
||||
#elif (JUCE_GCC || JUCE_CLANG) && JUCE_INTEL && ! JUCE_NO_INLINE_ASM
|
||||
asm("bswap %%eax" : "=a"(n) : "a"(n));
|
||||
return n;
|
||||
#elif JUCE_USE_MSVC_INTRINSICS
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static void callCPUID (int result[4], int infoType)
|
|||
__try
|
||||
#endif
|
||||
{
|
||||
#if JUCE_GCC
|
||||
#if JUCE_GCC || JUCE_CLANG
|
||||
__asm__ __volatile__ ("cpuid" : "=a" (result[0]), "=b" (result[1]), "=c" (result[2]),"=d" (result[3]) : "a" (infoType));
|
||||
#else
|
||||
__asm
|
||||
|
|
@ -331,7 +331,7 @@ static int64 juce_getClockCycleCounter() noexcept
|
|||
// MS intrinsics version...
|
||||
return (int64) __rdtsc();
|
||||
|
||||
#elif JUCE_GCC
|
||||
#elif JUCE_GCC || JUCE_CLANG
|
||||
// GNU inline asm version...
|
||||
unsigned int hi = 0, lo = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@
|
|||
#elif JUCE_MSVC && ! JUCE_NO_DEPRECATION_WARNINGS
|
||||
#define JUCE_DEPRECATED(functionDef) __declspec(deprecated) functionDef
|
||||
#define JUCE_DEPRECATED_WITH_BODY(functionDef, body) __declspec(deprecated) functionDef body
|
||||
#elif JUCE_GCC && ! JUCE_NO_DEPRECATION_WARNINGS
|
||||
#elif (JUCE_GCC || JUCE_CLANG) && ! JUCE_NO_DEPRECATION_WARNINGS
|
||||
#define JUCE_DEPRECATED(functionDef) functionDef __attribute__ ((deprecated))
|
||||
#define JUCE_DEPRECATED_WITH_BODY(functionDef, body) functionDef __attribute__ ((deprecated)) body
|
||||
#else
|
||||
|
|
@ -308,7 +308,7 @@
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_GCC
|
||||
#if JUCE_GCC || JUCE_CLANG
|
||||
#define JUCE_PACKED __attribute__((packed))
|
||||
#elif ! DOXYGEN
|
||||
#define JUCE_PACKED
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
- Either JUCE_32BIT or JUCE_64BIT, depending on the architecture.
|
||||
- Either JUCE_LITTLE_ENDIAN or JUCE_BIG_ENDIAN.
|
||||
- Either JUCE_INTEL or JUCE_PPC
|
||||
- Either JUCE_GCC or JUCE_MSVC
|
||||
- Either JUCE_GCC or JUCE_CLANG or JUCE_MSVC
|
||||
*/
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -179,7 +179,6 @@
|
|||
|
||||
#ifdef __clang__
|
||||
#define JUCE_CLANG 1
|
||||
#define JUCE_GCC 1
|
||||
#elif defined (__GNUC__)
|
||||
#define JUCE_GCC 1
|
||||
#elif defined (_MSC_VER)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
forcedinline uint8 getGreen() const noexcept { return components.g; }
|
||||
forcedinline uint8 getBlue() const noexcept { return components.b; }
|
||||
|
||||
#if JUCE_GCC && ! JUCE_CLANG
|
||||
#if JUCE_GCC
|
||||
// NB these are here as a workaround because GCC refuses to bind to packed values.
|
||||
forcedinline uint8& getAlpha() noexcept { return comps [indexA]; }
|
||||
forcedinline uint8& getRed() noexcept { return comps [indexR]; }
|
||||
|
|
|
|||
|
|
@ -1539,7 +1539,7 @@ private:
|
|||
DeleteObject (rgn);
|
||||
EndPaint (hwnd, &paintStruct);
|
||||
|
||||
#ifndef JUCE_GCC
|
||||
#if JUCE_MSVC
|
||||
_fpreset(); // because some graphics cards can unmask FP exceptions
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue