[fir] Remove unused fct recordTypeCanBeMemCopied
Remove unused fct added with 47f759309eeaf9bd77debe4f6c3e1fe52913b537
diff --git a/flang/lib/Optimizer/Builder/FIRBuilder.cpp b/flang/lib/Optimizer/Builder/FIRBuilder.cpp
index acfbee8..823016c 100644
--- a/flang/lib/Optimizer/Builder/FIRBuilder.cpp
+++ b/flang/lib/Optimizer/Builder/FIRBuilder.cpp
@@ -594,23 +594,3 @@
: builder.createIntegerConstant(loc, idxTy, ext));
return extents;
}
-
-/// Can the assignment of this record type be implement with a simple memory
-/// copy ?
-static bool recordTypeCanBeMemCopied(fir::RecordType recordType) {
- if (fir::hasDynamicSize(recordType))
- return false;
- for (auto [_, fieldType] : recordType.getTypeList()) {
- // Derived type component may have user assignment (so far, we cannot tell
- // in FIR, so assume it is always the case, TODO: get the actual info).
- if (fir::unwrapSequenceType(fieldType).isa<fir::RecordType>())
- return false;
- // Allocatable components need deep copy.
- if (auto boxType = fieldType.dyn_cast<fir::BoxType>())
- if (boxType.getEleTy().isa<fir::HeapType>())
- return false;
- }
- // Constant size components without user defined assignment and pointers can
- // be memcopied.
- return true;
-}