[PATCH] D16282: [opaque pointer types] [breaking-change] [NFC] Refactor gep_type_iterator and getIndexedOffset not to touch PointerType::getElementType.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 17:44:22 PST 2016
On Thu, Jan 21, 2016 at 4:25 PM, Manuel Jacob via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> mjacob added a comment.
>
> The title of this revision seems to be wrong. I don't see any changes to
> the API of `gep_type_iterator`.
>
>
> ================
> Comment at: include/llvm/IR/DataLayout.h:446
> @@ -444,3 +445,3 @@
> /// This is used to implement getelementptr.
> - uint64_t getIndexedOffset(Type *Ty, ArrayRef<Value *> Indices) const;
> + uint64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef<Value *>
> Indices) const;
>
> ----------------
> I'd like to hear another comment on the name before you commit this.
>
Seems OK to me - sure, could be better, but nothing jumps out at me
>
> ================
> Comment at: lib/IR/DataLayout.cpp:730-732
> @@ -731,2 +729,5 @@
>
> + // We can use 0 as the address space as we don't need
> + // to get pointer types back from gep_type_iterator.
> + unsigned AS = 0;
> generic_gep_type_iterator<Value* const*>
> ----------------
> I don't really like this. If this is required, we should consider changing
> the generic_gep_type_iterator API first.
>
True-ish. Also open to ideas here, but think this might be a sufficiently
narrow case that building better API for it may not be all that
interesting/worthwhile.
>
>
> http://reviews.llvm.org/D16282
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160121/bd29c72e/attachment.html>
More information about the llvm-commits
mailing list