================
@@ -13595,6 +13595,15 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr(
Info.Ctx.getOpenMPDefaultSimdAlign(E->getArgumentType()))
.getQuantity(),
E);
+ case UETT_VectorElements: {
+ QualType Ty = E->getTypeOfArgument();
+ // If the vector has a fixed size, we can determine the number of elements
+ // at compile time.
+ if (Ty->isVectorType())
+ return Success(Ty->castAs<VectorType>()->getNumElements(), E);
+
+ return false;
----------------
erichkeane wrote:
Your understanding of how this works is correct, I missed you were handling
sizeless vectors that way. So above 'return false' there
could be an `assert(Ty->isSizelessVectorType())` ?
Note that we're not guaranteed to come to ExprConstant.cpp in the case where it
is a sized-vector, so you likely need to make sure the CGExprScalar code
handles sized types as well.
https://github.com/llvm/llvm-project/pull/69010
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits