[flang-commits] [flang] [flang] AArch64 support for BIND(C) derived return types (PR #114051)

David Truby via flang-commits flang-commits at lists.llvm.org
Wed Nov 13 04:18:41 PST 2024


================
@@ -826,19 +826,65 @@ struct TargetAArch64 : public GenericTarget<TargetAArch64> {
     return marshal;
   }
 
+  // Flatten a RecordType::TypeList containing more record types or array types
+  static std::optional<std::vector<mlir::Type>>
+  flattenTypeList(const RecordType::TypeList &types) {
+    std::vector<mlir::Type> flatTypes;
+    // The flat list will be at least the same size as the non-flat list.
----------------
DavidTruby wrote:

I was trying to say in the comment that it was a lower bound (at least as big) but I can make it clearer.
The reserve is just to give a lower bound that will be big enough in simple cases

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


More information about the flang-commits mailing list