================
@@ -718,8 +707,8 @@ CGHLSLRuntime::handleStructSemanticLoad(IRBuilder<> &B, 
const FunctionDecl *FD,
   llvm::Value *Aggregate = llvm::PoisonValue::get(Type);
   auto FieldDecl = RD->field_begin();
   for (unsigned I = 0; I < ST->getNumElements(); ++I) {
-    llvm::Value *ChildValue =
-        handleSemanticLoad(B, FD, ST->getElementType(I), *FieldDecl);
+    llvm::Value *ChildValue = handleSemanticLoad(B, FD, ST->getElementType(I),
+                                                 *FieldDecl, begin, end);
----------------
s-perron wrote:

At first glance, it looks like this is wrong because it is not obvious that 
`begin` is updated. If I have to go look at the declaration or definition of 
the `handleSemanticLoad` to understands what is happening, it is a sign that 
this could be better.

Off the top of my head I don't have a good suggestion other than have the 
function return one-past-the-last  semantic that it consumed. Have it return a 
pair.

https://github.com/llvm/llvm-project/pull/166796
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to