[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

Alexander Richardson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 25 12:33:02 PDT 2024


================
@@ -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());
----------------
arichardson wrote:

Yeah I kept this check to allow replacing existing helper calls.

https://github.com/llvm/llvm-project/pull/105735


More information about the llvm-branch-commits mailing list