[llvm-commits] llvm-gcc: use component_ref_field_offset in component references

Duncan Sands baldrick at free.fr
Fri Mar 2 06:36:03 PST 2007


The third operand of a COMPONENT_REF represents the byte offset of
the field; it is accessed using component_ref_field_offset.  Most of
the time you can get away with extracting the offset from the type,
using DECL_FIELD_OFFSET, which is what is done currently, but this
can fail if DECL_FIELD_OFFSET contains a PLACEHOLDER_EXPR for example.
The NON_LVALUE_EXPR Ada testcase also tests this one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: component_ref.diff
Type: text/x-diff
Size: 4069 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070302/d84bfd7e/attachment.diff>


More information about the llvm-commits mailing list