[clang] df2e8ee - [CodeGen][AArch64] Replace PointerType::getUnqual(Type) with opaque version (NFC) (#126278)

via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 8 05:23:11 PST 2025


Author: Mats Jun Larsen
Date: 2025-02-08T13:23:08Z
New Revision: df2e8ee7ae349364967a1a2d09f17b249a38c04d

URL: https://github.com/llvm/llvm-project/commit/df2e8ee7ae349364967a1a2d09f17b249a38c04d
DIFF: https://github.com/llvm/llvm-project/commit/df2e8ee7ae349364967a1a2d09f17b249a38c04d.diff

LOG: [CodeGen][AArch64] Replace PointerType::getUnqual(Type) with opaque version (NFC) (#126278)

Follow-up to #123569

Added: 
    

Modified: 
    clang/lib/CodeGen/Targets/AArch64.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/Targets/AArch64.cpp b/clang/lib/CodeGen/Targets/AArch64.cpp
index 4922b082cf09ca..dc3a1d4287be17 100644
--- a/clang/lib/CodeGen/Targets/AArch64.cpp
+++ b/clang/lib/CodeGen/Targets/AArch64.cpp
@@ -843,7 +843,7 @@ RValue AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, QualType Ty,
 
   llvm::Type *BaseTy = CGF.ConvertType(Ty);
   if (IsIndirect)
-    BaseTy = llvm::PointerType::getUnqual(BaseTy);
+    BaseTy = llvm::PointerType::getUnqual(BaseTy->getContext());
   else if (AI.getCoerceToType())
     BaseTy = AI.getCoerceToType();
 
@@ -961,7 +961,7 @@ RValue AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, QualType Ty,
   if (IsIndirect) {
     // If it's been passed indirectly (actually a struct), whatever we find from
     // stored registers or on the stack will actually be a struct **.
-    MemTy = llvm::PointerType::getUnqual(MemTy);
+    MemTy = llvm::PointerType::getUnqual(MemTy->getContext());
   }
 
   const Type *Base = nullptr;


        


More information about the cfe-commits mailing list