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

Devang Patel dpatel at apple.com
Wed Oct 22 11:27:01 PDT 2008


On Oct 22, 2008, at 11:14 AM, Duncan Sands wrote:

> +    // 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 ?
>
> +    // A COMPONENT_REF for gcc field B will get LLVM field B which  
> has
> +    // offset 1 not 4.

-
Devang






More information about the llvm-commits mailing list