Commit bd3f8780 by Martin Radev Committed by Commit Bot

Fix GCC 5.4 compilation error when parsing the __clang__ macro

The __clang__ macro cannot be directly used with an #if directive if it has not been defined. This causes a compilation error under GCC 5.4 Linux. Change-Id: Ieca752cd9f0e90c82febc35e19e1c1f3c6096de1 Reviewed-on: https://chromium-review.googlesource.com/397220Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 476197f9
...@@ -104,7 +104,7 @@ bool DebugAnnotationsActive(); ...@@ -104,7 +104,7 @@ bool DebugAnnotationsActive();
#undef ANGLE_TRACE_ENABLED #undef ANGLE_TRACE_ENABLED
#endif #endif
#if defined(COMPILER_GCC) || __clang__ #if defined(COMPILER_GCC) || defined(__clang__)
#define ANGLE_CRASH() __builtin_trap() #define ANGLE_CRASH() __builtin_trap()
#else #else
#define ANGLE_CRASH() ((void)(*(volatile char *)0 = 0)) #define ANGLE_CRASH() ((void)(*(volatile char *)0 = 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment