================
@@ -860,26 +929,35 @@ std::optional<LValue>
CGHLSLRuntime::emitResourceArraySubscriptExpr(
TmpVar, Qualifiers(), AggValueSlot::IsDestructed_t(true),
AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsAliased_t(false),
AggValueSlot::DoesNotOverlap);
-
- Address ThisAddress = ValueSlot.getAddress();
- llvm::Value *ThisPtr = CGF.getAsNaturalPointerTo(
- ThisAddress, CD->getThisType()->getPointeeType());
+ Address TmpVarAddress = ValueSlot.getAddress();
// get total array size (= range size)
llvm::Value *Range =
llvm::ConstantInt::get(CGM.IntTy, getTotalArraySize(AST, ResArrayTy));
- // assemble the constructor parameters
- CallArgList Args;
- createResourceCtorArgs(CGM, CD, ThisPtr, Range, Index, ArrayDecl->getName(),
- RBA, VkBinding, Args);
-
- // call the constructor
- CGF.EmitCXXConstructorCall(CD, Ctor_Complete, false, false, ThisAddress,
Args,
- ValueSlot.mayOverlap(),
- ArraySubsExpr->getExprLoc(),
- ValueSlot.isSanitizerChecked());
-
- return CGF.MakeAddrLValue(TmpVar, ArraySubsExpr->getType(),
- AlignmentSource::Decl);
+ // if the result of the subscript operation is a single resource - call the
+ // constructor
----------------
llvm-beanz wrote:
```suggestion
// If the result of the subscript operation is a single resource, call the
// constructor.
```
LLVM coding standards comments should be complete and punctuated sentences.
(see: https://llvm.org/docs/CodingStandards.html#commenting).
https://github.com/llvm/llvm-project/pull/154248
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits