[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)
zhijian lin via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 08:00:18 PDT 2024
================
@@ -421,6 +503,11 @@ ABIArgInfo PPC32_SVR4_ABIInfo::classifyReturnType(QualType RetTy) const {
}
}
+ bool IsComplexInRegABI =
+ getCodeGenOpts().getComplexInRegABI() == CodeGenOptions::CMPLX_InGPR;
+ if (IsComplexInRegABI && RetTy->isAnyComplexType())
----------------
diggerlin wrote:
you do not need to introduce a new variable `IsComplexInRegABI` here since it only be used once.
change to
`if ((getCodeGenOpts().getComplexInRegABI() == CodeGenOptions::CMPLX_InGPR) && RetTy->isAnyComplexType())`
https://github.com/llvm/llvm-project/pull/77732
More information about the cfe-commits
mailing list