[llvm] DynamicAPInt: optimize size of structure (PR #97831)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 08:33:24 PDT 2024
================
@@ -1895,6 +1896,9 @@ class [[nodiscard]] APInt {
friend struct DenseMapInfo<APInt, void>;
friend class APSInt;
+ // Make DynamicAPInt a friend so it can access BitWidth directly.
+ friend DynamicAPInt;
----------------
nikic wrote:
```suggestion
friend class DynamicAPInt;
```
This seems to be the convention. (Technically you don't need the forward-declare if you do that, but I'd still keep it...)
https://github.com/llvm/llvm-project/pull/97831
More information about the llvm-commits
mailing list