[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 3 07:29:52 PDT 2023
erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.
2 nits on the CFE, else LGTM! Obviously you still need an LLVM reviewer for the backend changes.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:3701
+ QualType PointeeType = E->getType()->getPointeeType();
+ if (PointeeType.isNull())
+ return false;
----------------
We override `operator bool` to make this work.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:3703
+ return false;
+ if (auto *BaseDecl = PointeeType->getAsRecordDecl())
+ return hasBPFPreserveStaticOffset(BaseDecl);
----------------
if possible?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133361/new/
https://reviews.llvm.org/D133361
More information about the cfe-commits
mailing list