[X86] Add __get_cpuid_count to cpuid.h. Update __get_cpuid to check the maximum level...
authorCraig Topper <craig.topper@intel.com>
Sun, 9 Jul 2017 17:43:10 +0000 (17:43 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 9 Jul 2017 17:43:10 +0000 (17:43 +0000)
commitf6e8408a116405d0cc25b506e8c5b60ab4ab7bcd
treec0f86e7fcb2aacf91d39a64e0571a88f1fb905b7
parentf2d571c8acc301b4658cb27feb9fc6b1830e5c5e
[X86] Add __get_cpuid_count to cpuid.h. Update __get_cpuid to check the maximum level support before accessing the leaf. Rename level to leaf everywhere.

This matches gcc behavior.

llvm-svn: 307506
clang/lib/Headers/cpuid.h