projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdeafaf
)
[compiler-rt] initialize variables to silence warning. NFC.
author
Tim Northover
<tnorthover@apple.com>
Wed, 1 Feb 2023 12:17:39 +0000
(12:17 +0000)
committer
Tim Northover
<tnorthover@apple.com>
Wed, 1 Feb 2023 13:30:10 +0000
(13:30 +0000)
They were being initialized anyway, I believe, but the logic was a bit
convoluted for the Clang warnings to detect so we were getting "variable 'EBX'
may be uninitialized when used here" later on.
compiler-rt/lib/builtins/cpu_model.c
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/builtins/cpu_model.c
b/compiler-rt/lib/builtins/cpu_model.c
index
c5d7ae3
..
4e3ce7a
100644
(file)
--- a/
compiler-rt/lib/builtins/cpu_model.c
+++ b/
compiler-rt/lib/builtins/cpu_model.c
@@
-646,7
+646,7
@@
getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model,
static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
unsigned *Features) {
- unsigned EAX
, EBX
;
+ unsigned EAX
= 0, EBX = 0
;
#define setFeature(F) \
Features[F / 32] |= 1U << (F % 32)