[llvm] DataLayout: Fix latent issues with getMaxIndexSizeInBits (PR #118740)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 21:25:00 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff df43af40ec1d139caa5cb870c7e35ff6b91cdbc3 e590d58af6313d9e4b4ee9078623d80afff41bbe --extensions h,cpp -- llvm/include/llvm/IR/DataLayout.h llvm/lib/IR/DataLayout.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 5a110ed2b0..5b3ce2d62e 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -743,7 +743,7 @@ unsigned DataLayout::getPointerSize(unsigned AS) const {
unsigned DataLayout::getMaxIndexSizeInBits() const {
unsigned MaxIndexSize = 0;
for (const PointerSpec &Spec : PointerSpecs)
- MaxIndexSize =std::max(MaxIndexSize, Spec.IndexBitWidth);
+ MaxIndexSize = std::max(MaxIndexSize, Spec.IndexBitWidth);
return MaxIndexSize;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/118740
More information about the llvm-commits
mailing list