Skip to content
Commit 4b1c4844 authored by Akira Hatanaka's avatar Akira Hatanaka
Browse files

[CodeGen][ObjC] Fix GNU's encoding of bit-field ivars.

According to the documentation, when encoding a bit-field, GNU runtime
needs its starting position in addition to its type and size.

https://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html

Prior to r297702, the starting position information was not being
encoded, which is incorrect, and after r297702, an assertion started to
fail because an ObjCIvarDecl was being passed to a function expecting a
FieldDecl.

This commit moves LookupFieldBitOffset to ASTContext and uses the
function to encode the starting position of bit-fields.

llvm-svn: 306364
parent c9d9d797
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment