[clang] 6907c3d - [clang] Replace uses of Type::getPointerType (NFC)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 5 07:58:00 PDT 2023
Author: JOE1994
Date: 2023-10-05T10:57:41-04:00
New Revision: 6907c3dafd946c5598efe5cbc646809aee873254
URL: https://github.com/llvm/llvm-project/commit/6907c3dafd946c5598efe5cbc646809aee873254
DIFF: https://github.com/llvm/llvm-project/commit/6907c3dafd946c5598efe5cbc646809aee873254.diff
LOG: [clang] Replace uses of Type::getPointerType (NFC)
Opaque pointer clean-up effort
Added:
Modified:
clang/lib/CodeGen/CodeGenModule.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 2dd756919876918..f078a68231448ae 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -4790,7 +4790,8 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty,
assert(getContext().getTargetAddressSpace(ExpectedAS) == TargetAS);
if (DAddrSpace != ExpectedAS) {
return getTargetCodeGenInfo().performAddrSpaceCast(
- *this, GV, DAddrSpace, ExpectedAS, Ty->getPointerTo(TargetAS));
+ *this, GV, DAddrSpace, ExpectedAS,
+ llvm::PointerType::get(getLLVMContext(), TargetAS));
}
return GV;
@@ -5002,7 +5003,8 @@ castStringLiteralToDefaultAddressSpace(CodeGenModule &CGM,
if (AS != LangAS::Default)
Cast = CGM.getTargetCodeGenInfo().performAddrSpaceCast(
CGM, GV, AS, LangAS::Default,
- GV->getValueType()->getPointerTo(
+ llvm::PointerType::get(
+ CGM.getLLVMContext(),
CGM.getContext().getTargetAddressSpace(LangAS::Default)));
}
return Cast;
@@ -6377,7 +6379,8 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary(
if (AddrSpace != LangAS::Default)
CV = getTargetCodeGenInfo().performAddrSpaceCast(
*this, GV, AddrSpace, LangAS::Default,
- Type->getPointerTo(
+ llvm::PointerType::get(
+ getLLVMContext(),
getContext().getTargetAddressSpace(LangAS::Default)));
// Update the map with the new temporary. If we created a placeholder above,
More information about the cfe-commits
mailing list