[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:13:59 PST 2025


================
@@ -793,9 +793,9 @@ bool AArch64Arm64ECCallLowering::runOnModule(Module &Mod) {
   VoidTy = Type::getVoidTy(M->getContext());
 
   GuardFnType = FunctionType::get(PtrTy, {PtrTy, PtrTy}, false);
-  GuardFnPtrType = PointerType::get(GuardFnType, 0);
+  GuardFnPtrType = PointerType::get(M->getContext(), 0);
   DispatchFnType = FunctionType::get(PtrTy, {PtrTy, PtrTy, PtrTy}, false);
-  DispatchFnPtrType = PointerType::get(DispatchFnType, 0);
+  DispatchFnPtrType = PointerType::get(M->getContext(), 0);
----------------
junlarsen wrote:

Here, GuardFnPtrType and DispatchFnPtrType are now the same type. I can look into deduplicating them in a different patch

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


More information about the llvm-commits mailing list