================ @@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt &getValue() const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { + assert(getType()->isIntegerTy() && + "Returning the bitwidth of a vector constant is not support!"); ---------------- nikic wrote:
IMHO this is not necessary. If the name were `getSizeInBits()` I would agree, but the term "bit width" implies that we're talking about scalar. We don't use the term "bit width" to refer to full size of a vector. https://github.com/llvm/llvm-project/pull/74502 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits