[flang] Fix a warning

This patch fixes:

  flang-rt/lib/runtime/descriptor.cpp:30:19: error: first argument in
  call to 'memcpy' is a pointer to non-trivially copyable type
  'Fortran::runtime::Descriptor' [-Werror,-Wnontrivial-memcall]
This commit is contained in:
Kazu Hirata 2025-08-29 16:00:24 -07:00
parent 794f82edfc
commit da7ce52680

View File

@ -27,7 +27,7 @@ RT_OFFLOAD_API_GROUP_BEGIN
RT_API_ATTRS Descriptor::Descriptor(const Descriptor &that) { *this = that; }
RT_API_ATTRS Descriptor &Descriptor::operator=(const Descriptor &that) {
runtime::memcpy(this, &that, that.SizeInBytes());
runtime::memcpy(reinterpret_cast<void *>(this), &that, that.SizeInBytes());
return *this;
}