[PATCH] D158267: [clang][CodeGen] Avoid emitting unnecessary memcpy of records without content
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 18 10:15:44 PDT 2023
efriedma added a comment.
This looks sort of similar to CodeGen::isEmptyRecord... but I guess it's not quite the same thing. (Even if a struct isn't "empty" in the ABI sense, there still might not be anything to copy.)
Instead of looking for zero-length bitfields, you probably want to just check isUnnamedBitfield()? Unnamed bitfields are just padding, whether or not they're zero-length.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158267/new/
https://reviews.llvm.org/D158267
More information about the cfe-commits
mailing list