[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 11 11:38:06 PDT 2024
================
@@ -4777,6 +4783,13 @@ class CodeGenFunction : public CodeGenTypeCache {
/// aggregate type into a temporary LValue.
LValue EmitAggExprToLValue(const Expr *E);
+ enum ExprValueKind { EVK_RValue, EVK_NonRValue };
+
+ /// EmitAggFinalDestCopy - Emit copy of the specified aggregate into
+ /// destination address.
+ void EmitAggFinalDestCopy(QualType Type, AggValueSlot Dest, const LValue &Src,
----------------
efriedma-quic wrote:
It feels strange to be adding this API now... but I guess it's fine? The alternative would be to use EmitAggregateCopy directly. It only really makes a difference for structs containing pointers to ObjC types, which can't be passed by va_arg anyway, but I guess it's better for EmitLoadOfAnyValue to be fully general in case we add other uses in the future.
https://github.com/llvm/llvm-project/pull/94635
More information about the cfe-commits
mailing list