================
@@ -2456,6 +2461,139 @@ static RValue
EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF,
return RValue::get(CGF->Builder.CreateCall(UBF, Args));
}
+template <class T>
+void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType
Ty, size_t CurrentStartOffset, size_t &RunningOffset, T&& WriteZeroAtOffset);
+
+template <class T>
+void ClearPaddingStruct(CodeGenFunction &CGF, Value *Ptr, QualType Ty,
StructType *ST,
+ size_t CurrentStartOffset, size_t &RunningOffset, T&&
WriteZeroAtOffset) {
+ std::cerr << "\n struct! " << ST->getName().data() << std::endl;
+ auto SL = CGF.CGM.getModule().getDataLayout().getStructLayout(ST);
+
+ auto R = dyn_cast<CXXRecordDecl>(Ty->getAsRecordDecl());
+ if(!R) {
+ std::cerr << "\n not a CXXRecordDecl" << std::endl;
----------------
efriedma-quic wrote:
Is there supposed to be an early return here?
How are we supposed to deal with arrays?
https://github.com/llvm/llvm-project/pull/75371
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits