[clang][Headers] Use __has_builtin instead of _MSC_VER.
arm_acle.h relied on `_MSC_VER` to determine if a given function was already defined as a builtin. This was incorrect because `-fms-extensions` enables these builtins, but is not responsible for defining `_MSC_VER` on any target. The next closest thing is `_MSC_EXTENSIONS`, which is only defined on Windows targets, but even this is suboptimal. What this conditional is actually trying to determine is if the given functions are defined as builtins, so just check that directly. I also attempted to do this for `__nop`, but in that case intrin.h, which is only includable if `_MSC_VER` is defined, has its own definition. So in that case `_MSC_VER` is correct. Differential Revision: https://reviews.llvm.org/D75719 rdar://60102353
parent
c3de1d0b
Please register or sign in to comment