[llvm] [IR][SPIR-V] Replace of PointerType::get(Type) with opaque version (NFC) (PR #124755)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 06:36:07 PST 2025


================
@@ -629,7 +629,7 @@ SPIRVGlobalRegistry::getOrCreateConstNullPtr(MachineIRBuilder &MIRBuilder,
   unsigned AddressSpace = typeToAddressSpace(LLVMTy);
   // Find a constant in DT or build a new one.
   Constant *CP = ConstantPointerNull::get(
-      PointerType::get(::getPointeeType(LLVMTy), AddressSpace));
+      PointerType::get(::getPointeeType(LLVMTy)->getContext(), AddressSpace));
----------------
nikic wrote:

Shouldn't need to go through getPointeeType here.

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


More information about the llvm-commits mailing list