[PATCH] D86120: [NFC][llvm] Make the contructors of `ElementCount` private.

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 00:25:10 PDT 2020


david-arm added inline comments.


================
Comment at: llvm/lib/IR/ConstantFold.cpp:922
   unsigned MaskNumElts = Mask.size();
-  ElementCount MaskEltCount = {MaskNumElts, isa<ScalableVectorType>(V1VTy)};
+  ElementCount MaskEltCount =
+      ElementCount::get(MaskNumElts, isa<ScalableVectorType>(V1VTy));
----------------
Just a thought for code like this - since we're now calling ElementCount::get that means we can now use the 'auto' keyword in such places. This might help reduce the character count and help to fit on one line?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86120



More information about the llvm-commits mailing list