[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 12:16:03 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7a7cb8156b0a85f1eca772329644cae5989d4ed1 f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 --extensions h,c,cpp -- clang/test/CodeGen/PowerPC/transparent_union.c clang/lib/CodeGen/ABIInfoImpl.cpp clang/lib/CodeGen/ABIInfoImpl.h clang/lib/CodeGen/Targets/PPC.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/Targets/PPC.cpp b/clang/lib/CodeGen/Targets/PPC.cpp
index d2a3abbe24..eab2cfdcbe 100644
--- a/clang/lib/CodeGen/Targets/PPC.cpp
+++ b/clang/lib/CodeGen/Targets/PPC.cpp
@@ -219,11 +219,11 @@ ABIArgInfo AIXABIInfo::classifyArgumentType(QualType Ty) const {
}
if (isPromotableTypeForABI(Ty))
- return (IsTransparentUnion ?
- ABIArgInfo::getExtend(Ty,
- llvm::IntegerType::get(getVMContext(),
- getContext().getTypeSize(Ty)))
- : ABIArgInfo::getExtend(Ty));
+ return (IsTransparentUnion
+ ? ABIArgInfo::getExtend(
+ Ty, llvm::IntegerType::get(getVMContext(),
+ getContext().getTypeSize(Ty)))
+ : ABIArgInfo::getExtend(Ty));
return (ABIArgInfo::getDirect());
}
@@ -900,11 +900,11 @@ PPC64_SVR4_ABIInfo::classifyArgumentType(QualType Ty) const {
}
if (isPromotableTypeForABI(Ty))
- return (IsTransparentUnion ?
- ABIArgInfo::getExtend(Ty,
- llvm::IntegerType::get(getVMContext(),
- getContext().getTypeSize(Ty)))
- : ABIArgInfo::getExtend(Ty));
+ return (IsTransparentUnion
+ ? ABIArgInfo::getExtend(
+ Ty, llvm::IntegerType::get(getVMContext(),
+ getContext().getTypeSize(Ty)))
+ : ABIArgInfo::getExtend(Ty));
return ABIArgInfo::getDirect();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/101738
More information about the cfe-commits
mailing list