[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 27 14:15:39 PDT 2025
================
@@ -326,13 +326,47 @@ mlir::Value CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src,
return {};
}
+Address CIRGenFunction::getAddrOfBitFieldStorage(LValue base,
+ const FieldDecl *field,
+ mlir::Type fieldType,
+ unsigned index) {
+ if (index == 0)
+ return base.getAddress();
----------------
Andres-Salamanca wrote:
I made the change. In the tests, I used s->c, which is packed inside the first struct member.
https://github.com/llvm/llvm-project/pull/145971
More information about the cfe-commits
mailing list