[llvm] DynamicAPInt: optimize size of structure (PR #97831)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 12:41:44 PDT 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 298e292a76289d93f7c1a80c26e354830c6080e4 e48667c4e2f799465b5b6abca061ce9dcf6de786 -- llvm/include/llvm/ADT/APInt.h llvm/include/llvm/ADT/DynamicAPInt.h llvm/include/llvm/ADT/SlowDynamicAPInt.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ADT/DynamicAPInt.h b/llvm/include/llvm/ADT/DynamicAPInt.h
index 8523977769..b2e2d53b82 100644
--- a/llvm/include/llvm/ADT/DynamicAPInt.h
+++ b/llvm/include/llvm/ADT/DynamicAPInt.h
@@ -212,7 +212,8 @@ public:
friend hash_code hash_value(const DynamicAPInt &x); // NOLINT
void static_assert_layout() { // NOLINT
- constexpr size_t ValLargeOff = offsetof(DynamicAPInt, ValLarge.Val.BitWidth);
+ constexpr size_t ValLargeOff =
+ offsetof(DynamicAPInt, ValLarge.Val.BitWidth);
constexpr size_t ValSmallOff = offsetof(DynamicAPInt, ValSmall);
constexpr size_t ValSmallSz = sizeof(ValSmall);
static_assert(ValLargeOff >= ValSmallOff + ValSmallSz);
``````````
</details>
https://github.com/llvm/llvm-project/pull/97831
More information about the llvm-commits
mailing list