[clang] [CIR] Use data size in emitAggregateCopy for overlapping copies (PR #186702)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 06:16:13 PDT 2026


================
@@ -4149,21 +4149,32 @@ def CIR_CopyOp : CIR_Op<"copy",[
 
     The `volatile` keyword indicates that the operation is volatile.
 
+    The `skip_tail_padding` keyword indicates that only the data bytes should
+    be copied, excluding any tail padding. This is used when copying
+    potentially-overlapping subobjects where the tail padding might be occupied
+    by other objects (e.g. fields marked with `[[no_unique_address]]`). This
+    is only valid when the pointee type is a record type.
----------------
erichkeane wrote:

Can we put this in the verifier? 

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


More information about the cfe-commits mailing list