Hash :
9bf65575
Author :
Date :
2021-08-13T06:36:49
Correctly check for bswap builtins before using
The __clang_major__ and __clang_minor__ macros provide a marketing
version, which is not necessarily comparable for clang distributions
from different vendors[1]. In practice, the versioning scheme for
Apple's clang is indeed completely different to that of the llvm.org
releases. It is thus preferable to check for features directly rather
than comparing versions.
In this specific case, __builtin_bswap16 was being used with older
Apple clang versions that don't support it.
[1] https://clang.llvm.org/docs/LanguageExtensions.html#builtin-macros