[PATCH] D105321: [Bitcode][OpaquePtr] Remove usages of PointerType's getElementType()
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 2 11:48:34 PDT 2021
zequanwu added a comment.
In D105321#2854815 <https://reviews.llvm.org/D105321#2854815>, @nikic wrote:
> I don't really get how this is supposed to work. If opaque pointers are enabled, all PointerTypes (in the same address space) are going to be the same, so you can't create a meaningful map from PointerType to element type. The map will effectively store the last element type it has seen on any pointer.
This is to be compatible with llvm bitcode file with opaque pointer disabled. Those files have pointers' pointee types encoded. So, we need the map to keep track of pointers' pointee types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105321/new/
https://reviews.llvm.org/D105321
More information about the llvm-commits
mailing list