From 7b9d73c2f90c0ed8497339a16fc39785349d9610 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 7 Nov 2023 17:26:26 +0100 Subject: [NFC] Remove Type::getInt8PtrTy (#71029) Replace this with PointerType::getUnqual(). Followup to the opaque pointer transition. Fixes an in-code TODO item. --- llvm/lib/CodeGen/StackProtector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/StackProtector.cpp') diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index 3ba85bc125a0..71676843eaf9 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -451,7 +451,7 @@ static bool CreatePrologue(Function *F, Module *M, Instruction *CheckLoc, const TargetLoweringBase *TLI, AllocaInst *&AI) { bool SupportsSelectionDAGSP = false; IRBuilder<> B(&F->getEntryBlock().front()); - PointerType *PtrTy = Type::getInt8PtrTy(CheckLoc->getContext()); + PointerType *PtrTy = PointerType::getUnqual(CheckLoc->getContext()); AI = B.CreateAlloca(PtrTy, nullptr, "StackGuardSlot"); Value *GuardSlot = getStackGuard(TLI, M, B, &SupportsSelectionDAGSP); @@ -622,7 +622,7 @@ BasicBlock *StackProtector::CreateFailBB() { if (Trip.isOSOpenBSD()) { StackChkFail = M->getOrInsertFunction("__stack_smash_handler", Type::getVoidTy(Context), - Type::getInt8PtrTy(Context)); + PointerType::getUnqual(Context)); Args.push_back(B.CreateGlobalStringPtr(F->getName(), "SSH")); } else { StackChkFail = -- cgit v1.2.3