================
@@ -243,16 +238,18 @@ static Value *initializeLocalResourceArray(
Index = CGF.Builder.CreateAdd(Index, One);
GEPIndices.back() = llvm::ConstantInt::get(IntTy, I);
}
- Address ThisAddress =
+ Address ReturnAddress =
CGF.Builder.CreateGEP(TmpArrayAddr, GEPIndices, Ty, Align);
- llvm::Value *ThisPtr = CGF.getAsNaturalPointerTo(ThisAddress, ElemType);
CallArgList Args;
- createResourceCtorArgs(CGF.CGM, CD, ThisPtr, Range, Index, ResourceName,
- RBA, VkBinding, Args);
- CGF.EmitCXXConstructorCall(CD, Ctor_Complete, false, false, ThisAddress,
- Args, ValueSlot.mayOverlap(), ArraySubsExprLoc,
- ValueSlot.isSanitizerChecked());
+ CXXMethodDecl *CreateMethod = lookupResourceInitMethodAndSetupArgs(
+ CGF.CGM, ResourceDecl, Range, Index, ResourceName, RBA, VkBinding,
+ Args);
+
+ if (!CreateMethod)
+ return std::nullopt;
----------------
llvm-beanz wrote:
Chatted with @hekota offline. Seems like this happens for manually written
structs containing handles, and the outcome here is that they just don't get
bindings generated. I think not supporting automatically binding handles for
people writing their own types against internal compiler details is completely
reasonable.
https://github.com/llvm/llvm-project/pull/157005
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits