[llvm-commits] [llvm-gcc-4.2] r57992 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Wed Oct 22 22:39:22 PDT 2008


Hi Devang,

> > +    // Type conversion does not ensure that there is always an LLVM  
> > field
> > +    // starting at the same byte as the gcc field.  Correct for  
> > this now.
> > +    // An example of how this can occur is:
> > +    //   Field A: offset 0, length 1
> > +    //   Field B: offset 4, length 4 (4 byte alignment)
> > +    //   Field C: offset 6
> > +    // Since field C overlaps field B, we delete field B and  
> > replace it with
> > +    // padding:
> > +    //   LLVM A: offset 0, length 1
> > +    //   LLVM B: offset 1, length 5 (1 byte alignment) - padding  
> > array
> > +    //   LLVM C: offset 6
> 
> So, in this case "Field B" will be represented by 3rd llvm field ? If  
> so then is it 4 byte aligned ?

the gcc "Field B" is currently represented by the second llvm field "LLVM B".
That's because it's the only LLVM field that contains the first byte of gcc
"Field B" (the first byte is at offset 4).

Ciao,

Duncan.



More information about the llvm-commits mailing list