This patch adds getWithIncrement/getWithDecrement methods to
ElementCount and TypeSize to allow:
TypeSize::getFixed(8).getWithIncrement(8) <=> TypeSize::getFixed(16) TypeSize::getFixed(16).getWithDecrement(8) <=> TypeSize::getFixed(8) TypeSize::getScalable(8).getWithIncrement(8) <=> TypeSize::getScalable(16) TypeSize::getScalable(16).getWithDecrement(8) <=> TypeSize::getScalable(8)
This patch implements parts of the POC in D90342.
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?