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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to