[PATCH] D26594: IR: Change the gep_type_iterator API to avoid always exposing the "current" type.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 10:22:40 PST 2016


dblaikie added a comment.

Seems odd to have an iterator-like thing without any op*, though.

Should we make op* return 'getIndexedType' (I realize this is a subtle API break to change the semantics of an existing operation - perhaps better to leave that as a cleanup a version or two from now (leave a FIXME)?)

I think you've stared at this code a fair bit more than I have (certainly more than I have recently - I'm probably the one to blame for the AddressSpace parameter being plumbed through a year ago or something) - could you summarize/explain why the need for such a variety of member functions on the iterator now? (getArray, isArray, isBoundedArray, getArrayBound, isStruct, getStruct, getStructOrNull)

It'd be nice if there were some more unifying API - currently this diversity seems a bit awkward.


https://reviews.llvm.org/D26594





More information about the llvm-commits mailing list