[PATCH] D90713: [TypeSize] Extend UnivariateLinearPolyBase with getWithIncrement/Decrement methods

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 02:51:58 PST 2020


dmgreen added inline comments.


================
Comment at: llvm/include/llvm/Support/TypeSize.h:241
+  LeafTy getWithIncrement(ScalarTy RHS) {
+    return static_cast<LeafTy>(
+        UnivariateLinearPolyBase(Value + RHS, UnivariateDim));
----------------
I'm pretty sure my C++ has gotten worse since I started working on compilers.

Is the static_cast here needed? Will that end up just calling the new conversion constructor. Can it just create a LeafTy directly?


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

https://reviews.llvm.org/D90713



More information about the llvm-commits mailing list