[clang] 71a9b88 - [X86] Use unsigned int for return type of __get_cpuid_max.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 11:45:46 PDT 2022


Author: Craig Topper
Date: 2022-10-14T11:45:20-07:00
New Revision: 71a9b8833231a285b4d8d5587c699ed45881624b

URL: https://github.com/llvm/llvm-project/commit/71a9b8833231a285b4d8d5587c699ed45881624b
DIFF: https://github.com/llvm/llvm-project/commit/71a9b8833231a285b4d8d5587c699ed45881624b.diff

LOG: [X86] Use unsigned int for return type of __get_cpuid_max.

It looks like gcc's header already uses unsigned int and we should
match.

Fixes PR58359.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D135966

Added: 
    

Modified: 
    clang/lib/Headers/cpuid.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h
index caa0069c2e1f..442ef5bb3419 100644
--- a/clang/lib/Headers/cpuid.h
+++ b/clang/lib/Headers/cpuid.h
@@ -261,7 +261,8 @@
         : "0"(__leaf), "2"(__count))
 #endif
 
-static __inline int __get_cpuid_max (unsigned int __leaf, unsigned int *__sig)
+static __inline unsigned int __get_cpuid_max (unsigned int __leaf,
+                                              unsigned int *__sig)
 {
     unsigned int __eax, __ebx, __ecx, __edx;
 #if __i386__


        


More information about the cfe-commits mailing list