CaprYang added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:289
+
+static bool hasSameElementOfPtrOrVecPtrs(Type *Ty1, Type *Ty2) {
+ assert(isPtrOrVecOfPtrsType(Ty1) && isPtrOrVecOfPtrsType(Ty2));
----------------
arsenm wrote:
> arsenm wrote:
> > Ditto, only opaque pointers matter now
> You don't need to bother using getWithSamePointeeType. You can use
> Type::getWithNewType
Does it mean this? do't check non-opaque types.
```
static Type *getPtrOrVecOfPtrsWithNewAS(Type *Ty, unsigned NewAddrSpace) {
assert(Ty->isPtrOrPtrVectorTy());
PointerType *NPT = PointerType::get(Ty->getContext(), NewAddrSpace);
return Ty->getWithNewType(NPT);
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150043/new/
https://reviews.llvm.org/D150043
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits