================
@@ -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:

Shouldn't this 'return false' just be an  assert?  (That is, instead of the 
'if')?  Or is there a way for a non-vector type to make it through?

Additionally, what about sizeless vectors here?  Should we be testing for those 
instead to make this a 'fail'?  And does that case need a diagnostic?

https://github.com/llvm/llvm-project/pull/69010
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to