[clang] [Sparc][clang] make `_Complex` ABI GCC-compatible (PR #212340)
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 2 14:01:18 PDT 2026
================
@@ -277,6 +313,22 @@ ABIArgInfo SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit,
return ABIArgInfo::getExtend(Ty);
}
+ // When being GCC-compatible, cast a complex char, short and int to an integer
+ // type of the right size to get the correct scalar-like behavior. Other
+ // comple types fall through and are treated like any other struct, e.g.
----------------
s-barannikov wrote:
```suggestion
// complex types fall through and are treated like any other struct, e.g.
```
(nit) "like any other struct" is a bit misleading because `_Complex` is not a struct type. Maybe something like "like a struct containing the real and imaginary parts"?
https://github.com/llvm/llvm-project/pull/212340
More information about the cfe-commits
mailing list