Commit 3c76d59f by jchen10 Committed by Commit Bot

Check GCC for __has_attribute

The __has_attribute macro was one of improvements in GCC 5 release. See https://gcc.gnu.org/gcc-5/changes.html. This checks to make it work with older GCC. BUG=angleproject:2119 Change-Id: I751249b9d028d1322829bebc1ca8d423edf27057 Reviewed-on: https://chromium-review.googlesource.com/599152 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 188fd5f6
...@@ -255,7 +255,7 @@ std::string ToString(const T &value) ...@@ -255,7 +255,7 @@ std::string ToString(const T &value)
} }
// The below inlining code lifted from V8. // The below inlining code lifted from V8.
#if defined(__clang__) || defined(__GNUC__) #if defined(__clang__) || (defined(__GNUC__) && defined(__has_attribute))
#define ANGLE_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline)) #define ANGLE_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))
#define ANGLE_HAS___FORCEINLINE 0 #define ANGLE_HAS___FORCEINLINE 0
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
......
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