[PATCH] D16418: [opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromConstPtr.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 17:27:38 PST 2016


On Thu, Jan 21, 2016 at 5:10 PM, Eduard Burtescu via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> eddyb added inline comments.
>
> ================
> Comment at: lib/Analysis/ConstantFolding.cpp:488
> @@ -485,3 +487,3 @@
>      return nullptr;
> -  Type *DestTy = DestPtrTy->getElementType();
> +  Type *SrcTy = SrcPtrTy->getPointerElementType();
>
> ----------------
> dblaikie wrote:
> > Presumably this could be getElementType (since SrcPtrTy is already a
> PointerType) - but in either case this is a stop-gap and will eventually be
> removed/migrated?
> I've been using `getPointerElementType` everywhere so it matches my local
> setup where `PointerType::getPointerElementType` is the only method used
> everywhere (the one on `Value` is gone and `PointerType::getElementType` is
> deprecated).
>

What's the purpose/advantage of that? (either way, both calls will have to
be eliminated - I guess it's easier to grep for "getPointerElementType"?)


>
>
> http://reviews.llvm.org/D16418
>
>
>
> _______________________________________________
> 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/86514d6b/attachment.html>


More information about the llvm-commits mailing list