Unverified Commit a52e9eca authored by Nemanja Ivanovic's avatar Nemanja Ivanovic Committed by GitHub
Browse files

[Preprocessor] Fix __has_builtin for CPU ID functions (#80058)

My recent commit (67c1c1db) made the CPU ID builtins target-independent
so they can be used on PPC as well. However, that had the unintended
consequence of changing the behaviour of __has_builtin in that it
reports these as supported at the pre-processor level. This makes it
impossible to guard the use of these with this feature test macro which
is clearly not ideal.
This patch restores the behaviour of __has_builtin for __builtin_cpu_is,
__builtin_cpu_init,
__builtin_cpu_supports. Now the preprocessor queries the target to
determine whether the target supports the builtin.
parent acf6811d
Supports Markdown
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