[clang] [Sparc][clang] make `_Complex` ABI GCC-compatible (PR #212340)

Sergei Barannikov via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 31 18:50:38 PDT 2026


================
@@ -25,12 +32,30 @@ class SparcV8ABIInfo : public DefaultABIInfo {
   SparcV8ABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}
 
 private:
+  llvm::Type *getComplexIntCoerceType(QualType Ty) const;
   ABIArgInfo classifyReturnType(QualType RetTy) const;
   ABIArgInfo classifyArgumentType(QualType Ty) const;
   void computeInfo(CGFunctionInfo &FI) const override;
 };
 } // end anonymous namespace
 
+llvm::Type *SparcV8ABIInfo::getComplexIntCoerceType(QualType Ty) const {
----------------
s-barannikov wrote:

(nit) It would be cleaner to let this function handle all complex types:
```suggestion
ABIArgInfo SparcV8ABIInfo::classifyComplexType(const ComplexType *Ty) const {
```


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


More information about the cfe-commits mailing list