================ @@ -361,6 +414,16 @@ class DataLayout { return PTy && isNonIntegralPointerType(PTy); } + bool shouldAvoidPtrToInt(Type *Ty) const { + auto *PTy = dyn_cast<PointerType>(Ty); + return PTy && shouldAvoidPtrToInt(PTy->getPointerAddressSpace()); ---------------- jrtc27 wrote:
It seems odd to ask about ptrtoint for something where you don't know it's a pointer already, but I guess this is to match isNonIntegralPointerType which seems to have a decent number of uses. https://github.com/llvm/llvm-project/pull/105735 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits