[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 29 11:36:01 PDT 2018


dblaikie added a subscriber: paulsemel.
dblaikie added a comment.

Yeah, doesn't look like this code handles a value crossing the boundary of
the size of the bitfield type (it's reading only the low bit).

I suspect looking at the code that generates bitfield accesses would be
useful - and/or maybe actually calling into that very code, rather than
reimplementing it here? CodeGenFunction::EmitLoadOfBitfieldLValue seems to
be the place to go (I found this by writing a short example that loads one
of these strided bitfield values & then breaking in
llvm::BinaryOperator::BinaryOperator until I found the 'and' operation,
since that seemed like the more interesting one).


Repository:
  rC Clang

https://reviews.llvm.org/D47953





More information about the cfe-commits mailing list