[PATCH] D141134: [NFC] Only expose getXXXSize functions in TypeSize
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 07:05:37 PST 2023
gchatelet marked an inline comment as done.
gchatelet added inline comments.
================
Comment at: llvm/include/llvm/Support/TypeSize.h:319-322
+ // Make 'getKnownMinValue' / 'getFixedValue' private as they are exposed as
+ // 'getKnownMinValue' / 'getFixedValue' lower in this class.
+ constexpr ScalarTy getKnownMinValue() const { return UP::getKnownMinValue(); }
+ constexpr ScalarTy getFixedValue() const { return UP::getFixedValue(); }
----------------
sdesmalen wrote:
> They're both only used once below, so I think you can remove the private interface and just call the parent class' method directly?
I could but then the methods would still be visible. Another option is to mark the functions protected in `FixedOrScalableQuantity` and make them public only in `ElementCount`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141134/new/
https://reviews.llvm.org/D141134
More information about the llvm-commits
mailing list