[llvm] [IR] Replace of PointerType::get(Type) with opaque version (NFC) (PR #123617)

Mats Jun Larsen via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 06:35:50 PST 2025


================
@@ -297,7 +297,7 @@ Type *TypeMapTy::get(Type *Ty, SmallPtrSet<StructType *, 8> &Visited) {
     return *Entry = VectorType::get(ElementTypes[0],
                                     cast<VectorType>(Ty)->getElementCount());
   case Type::PointerTyID:
-    return *Entry = PointerType::get(ElementTypes[0],
+    return *Entry = PointerType::get(Ty->getContext(),
                                      cast<PointerType>(Ty)->getAddressSpace());
----------------
junlarsen wrote:

Yeah seems reasonable

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


More information about the llvm-commits mailing list