[PATCH] D136768: Make typed pointers to be yet again recognized as pointers

Dmitry Sidorov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 07:45:51 PDT 2022


sidorovd created this revision.
Herald added a project: All.
sidorovd requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136768

Files:
  llvm/include/llvm/IR/Type.h


Index: llvm/include/llvm/IR/Type.h
===================================================================
--- llvm/include/llvm/IR/Type.h
+++ llvm/include/llvm/IR/Type.h
@@ -220,7 +220,9 @@
   bool isArrayTy() const { return getTypeID() == ArrayTyID; }
 
   /// True if this is an instance of PointerType.
-  bool isPointerTy() const { return getTypeID() == PointerTyID; }
+  bool isPointerTy() const {
+    return getTypeID() == PointerTyID || getTypeID() == TypedPointerTyID;
+  }
 
   /// True if this is an instance of an opaque PointerType.
   bool isOpaquePointerTy() const;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136768.470817.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221026/37bbf81a/attachment.bin>


More information about the llvm-commits mailing list