[PATCH] D22488: [IR] Introduce a non-integral pointer type
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 12:02:32 PDT 2016
sanjoy added inline comments.
================
Comment at: lib/IR/Verifier.cpp:2413-2415
@@ +2412,5 @@
+
+ if (auto *PTy = dyn_cast<PointerType>(SrcTy->getScalarType()))
+ Assert(!M->getDataLayout().isNonIntegralPointerType(PTy),
+ "ptrtoint not supported for non-integral pointers");
+
----------------
arsenm wrote:
> What about vector of pointers?
Won't `getScalarType` take care of that? I'll add a test case.
================
Comment at: lib/IR/Verifier.cpp:2442-2444
@@ +2441,5 @@
+
+ if (auto *PTy = dyn_cast<PointerType>(DestTy->getScalarType()))
+ Assert(!M->getDataLayout().isNonIntegralPointerType(PTy),
+ "inttoptr not supported for non-integral pointers");
+
----------------
arsenm wrote:
> Ditto
Won't `getScalarType` take care of that? I'll add a test case.
https://reviews.llvm.org/D22488
More information about the llvm-commits
mailing list