Hi Devang,

> >> +        // Skip 'int:0', which just affects layout.
> >> +        unsigned FieldSizeInBits =  
> >> TREE_INT_CST_LOW(DECL_SIZE(Field));
> >> +        if (FieldSizeInBits == 0)
> >> +          continue;
> >
> > This is probably safe (not completely clear), but why do you need to  
> > do it at all?
> 
>    getLLVMFieldFor() does not handle zero-sized bit-fields.

so this is fixing a getLLVMFieldFor crash noticed while working on
struct passing?  I have a patch somewhere that causes zero-sized
bit-fields to be indexed properly (I thought it had been applied
at some point, but I guess it fell through a crack...).  I will
dig it out and apply it, since I think it is better if you can
always rely on every gcc field having an LLVM field index (except
for variable offset fields, for which that is impossible).

Ciao,

Duncan.
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to