================
@@ -2163,6 +2163,51 @@ static void BuildFlattenedTypeList(QualType BaseTy,
   }
 }
 
+bool SemaHLSL::IsLineVectorLayoutCompatibleType(clang::QualType QT) {
+  if (QT.isNull())
+    return false;
+
+  llvm::SmallVector<QualType, 16> QTTypes;
+  BuildFlattenedTypeList(QT, QTTypes);
----------------
hekota wrote:

This certainly works, but I wonder if building up the full flattened type is 
really needed. You just need to scan the type and make sure all elements are 
the same and get the total size while doing that. That should not require a 
separate list and allocations.

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

Reply via email to