[llvm] DynamicAPInt: optimize size of structure (PR #97831)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 08:42:41 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;
----------------
artagnon wrote:
`friend class` doesn't seem to work, either with or without the forward declaration. Please see the difference between elaborated class specifiers and type specifiers: https://en.cppreference.com/w/cpp/language/friend.
https://github.com/llvm/llvm-project/pull/97831
More information about the llvm-commits
mailing list