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

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 09:44:33 PDT 2024


================
@@ -2161,6 +2161,19 @@ static RValue EmitLoadOfMatrixLValue(LValue LV, SourceLocation Loc,
   return RValue::get(CGF.EmitLoadOfScalar(LV, Loc));
 }
 
+RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, 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:
+    return RValue::getAggregate(LV.getAddress());
----------------
Fznamznon wrote:

Ok, done.

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


More information about the cfe-commits mailing list