r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 22 11:09:48 PDT 2017


Do you want the same encoding for the bitfield “int : 1” you saw before r297792, which is just “i"?

The encoding for bitfield is normally bN where N is the number of bits, but the comment in function EncodeBitField says GNU runtime encodes it differently.

> On Jun 22, 2017, at 8:30 AM, Joerg Sonnenberger <joerg at bec.de> wrote:
> 
> On Mon, Jun 12, 2017 at 09:03:10PM +0200, Joerg Sonnenberger wrote:
>> On Thu, Jun 01, 2017 at 05:58:41PM -0700, Akira Hatanaka wrote:
>>> It crashes when there is an anonymous ivar of a bitfield type.
>>> 
>>> @interface FormatScanner {
>>>  int : 1;
>>> }
>>> @end
>>> 
>>> @implementation FormatScanner
>>> @end
>>> 
>>> I'm not sure if the code above is valid or not, but out of curiosity,
>>> why would you want an anonymous bitfield variable?
>> 
>> It's a reduced test case. The original test case has a variable name in
>> it.
> 
> Ping?
> 
> Joerg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170622/3f351d92/attachment.html>


More information about the cfe-commits mailing list