[flang-commits] [flang] [flang] remove support for std::complex value lowering. (PR #110643)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Tue Oct 1 10:12:01 PDT 2024
================
@@ -400,17 +400,19 @@ constexpr TypeBuilderFunc getModel<bool &>() {
return fir::ReferenceType::get(f(context));
};
}
-template <>
-constexpr TypeBuilderFunc getModel<std::complex<float>>() {
- return [](mlir::MLIRContext *context) -> mlir::Type {
- return mlir::ComplexType::get(mlir::FloatType::getF32(context));
- };
-}
+
+// getModel<std::complex<T>> are not implemented on purpose.
+// Prefer passing/returning the complex by reference in the runtime to
+// avoid ABI issues.
+// C++ std::complex is not an intrinsic type, and it while it is storage
----------------
clementval wrote:
```suggestion
// C++ std::complex is not an intrinsic type, and while it is storage
```
https://github.com/llvm/llvm-project/pull/110643
More information about the flang-commits
mailing list