$OpenBSD: patch-tools_clang_lib_CodeGen_TargetInfo_cpp,v 1.3 2021/05/18 03:35:07 rsadowski Exp $

- Fix va_arg in C++, Objective-C on 32-bit powerpc.

Index: tools/clang/lib/CodeGen/TargetInfo.cpp
--- tools/clang/lib/CodeGen/TargetInfo.cpp.orig
+++ tools/clang/lib/CodeGen/TargetInfo.cpp
@@ -4711,13 +4711,12 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction 
   // };
 
   bool isI64 = Ty->isIntegerType() && getContext().getTypeSize(Ty) == 64;
-  bool isInt =
-      Ty->isIntegerType() || Ty->isPointerType() || Ty->isAggregateType();
+  bool isInt = !Ty->isFloatingType();
   bool isF64 = Ty->isFloatingType() && getContext().getTypeSize(Ty) == 64;
 
   // All aggregates are passed indirectly?  That doesn't seem consistent
   // with the argument-lowering code.
-  bool isIndirect = Ty->isAggregateType();
+  bool isIndirect = isAggregateTypeForABI(Ty);
 
   CGBuilderTy &Builder = CGF.Builder;
 
