[PATCH] D76748: [llvm][Support] Add isZero method for TypeSize. [NFC]

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 14:09:00 PDT 2020


fpetrogalli marked an inline comment as done.
fpetrogalli added inline comments.


================
Comment at: llvm/include/llvm/Support/TypeSize.h:153
+  // Returns true if the type size is zero.
+  bool isZero() const { return MinSize == 0; }
+
----------------
fpetrogalli wrote:
> sdesmalen wrote:
> > nit: I mentioned this to Graham when he first proposed TypeSize, but having this variable named 'MinSize' is a bit odd when you compare with Zero, because in a sense, the minimum size of <anything> is always zero :)
> Agree. Shall we rename it to `KnownSize`, and consequently rename the get method to `getKnownSize`?
> 
> Thanks for the review!
Of course, in a separate patch! :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76748/new/

https://reviews.llvm.org/D76748





More information about the llvm-commits mailing list