[PATCH] D38473: Include getting generated struct offsets in CodegenABITypes

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 15:03:28 PDT 2017


rsmith added a comment.

I have no philosophical objection to exposing this, but defer to @rjmccall on that. As is usual with our C++ API, there's no guarantee that we will keep this working in future versions. (Eg, if we move to an IR representation using something non-GEPable to represent a source-level class type, we would remove this function as it would be meaningless.)

This interface does not seem to be sufficient to support bit-fields. You should also indicate *which* record layout (complete object type or base subobject type) the field number is for. I don't think there's any guarantee that the same indexes work in both.


https://reviews.llvm.org/D38473





More information about the cfe-commits mailing list