[llvm] 29e467f - [llvm] Deprecate Type::getPointerTo() (#113331)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 08:50:37 PST 2024
Author: Youngsuk Kim
Date: 2024-11-06T11:50:34-05:00
New Revision: 29e467fc78eb8b4308b57272ca4ad0d1f744f25f
URL: https://github.com/llvm/llvm-project/commit/29e467fc78eb8b4308b57272ca4ad0d1f744f25f
DIFF: https://github.com/llvm/llvm-project/commit/29e467fc78eb8b4308b57272ca4ad0d1f744f25f.diff
LOG: [llvm] Deprecate Type::getPointerTo() (#113331)
`llvm::Type::getPointerTo()` is no longer needed with opaque pointers in LLVM.
It may rather confuse new contributors to think that LLVM has typed pointers.
Added:
Modified:
llvm/include/llvm/IR/Type.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h
index d563b25d600a0c..7fa940ab347af6 100644
--- a/llvm/include/llvm/IR/Type.h
+++ b/llvm/include/llvm/IR/Type.h
@@ -472,8 +472,9 @@ class Type {
static Type *getWasm_FuncrefTy(LLVMContext &C);
/// Return a pointer to the current type. This is equivalent to
- /// PointerType::get(Foo, AddrSpace).
+ /// PointerType::get(Ctx, AddrSpace).
/// TODO: Remove this after opaque pointer transition is complete.
+ LLVM_DEPRECATED("Use PointerType::get instead", "PointerType::get")
PointerType *getPointerTo(unsigned AddrSpace = 0) const;
private:
More information about the llvm-commits
mailing list