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:
3ab51ff
)
[AST] Use llvm::bit_width (NFC)
author
Kazu Hirata
<kazu@google.com>
Thu, 26 Jan 2023 06:59:51 +0000
(22:59 -0800)
committer
Kazu Hirata
<kazu@google.com>
Thu, 26 Jan 2023 06:59:51 +0000
(22:59 -0800)
clang/lib/AST/Type.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/Type.cpp
b/clang/lib/AST/Type.cpp
index a713d6e3bd030eb7fa6b004652d301422b74dab9..206cf6ee09d244c5b692eaf8324769f9a70385c1 100644
(file)
--- a/
clang/lib/AST/Type.cpp
+++ b/
clang/lib/AST/Type.cpp
@@
-158,7
+158,7
@@
unsigned ConstantArrayType::getNumAddressingBits(const ASTContext &Context,
if ((ElementSize >> 32) == 0 && NumElements.getBitWidth() <= 64 &&
(NumElements.getZExtValue() >> 32) == 0) {
uint64_t TotalSize = NumElements.getZExtValue() * ElementSize;
- return
64 - llvm::countLeadingZeros
(TotalSize);
+ return
llvm::bit_width
(TotalSize);
}
// Otherwise, use APSInt to handle arbitrary sized values.