[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 02:02:28 PDT 2024


================
@@ -2161,6 +2161,21 @@ static RValue EmitLoadOfMatrixLValue(LValue LV, SourceLocation Loc,
   return RValue::get(CGF.EmitLoadOfScalar(LV, Loc));
 }
 
+RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, AggValueSlot Slot,
+                                           SourceLocation Loc) {
+  QualType Ty = LV.getType();
+  switch (getEvaluationKind(Ty)) {
+  case TEK_Scalar:
+    return EmitLoadOfLValue(LV, Loc);
+  case TEK_Complex:
+    return RValue::getComplex(EmitLoadOfComplex(LV, Loc));
+  case TEK_Aggregate:
+    EmitAggFinalDestCopy(Ty, Slot, LV, EVK_RValue);
----------------
Fznamznon wrote:

Ok, passed EVK_NonRValue instead.

https://github.com/llvm/llvm-project/pull/94635


More information about the cfe-commits mailing list