Skip to content

Commit 58d92f5

Browse files
committed
[IR] Deprecate PointerType::get/getUnqual pointee type overload
Deprecates the methods and schedules them for removal in the future as the overloads taking LLVMContext are preferred, as the pointee type has no meaning in opaque pointers. Part of #123569
1 parent 7833107 commit 58d92f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/include/llvm/IR/DerivedTypes.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,13 +685,19 @@ class PointerType : public Type {
685685

686686
/// This constructs a pointer to an object of the specified type in a numbered
687687
/// address space.
688+
LLVM_DEPRECATED("PointerType::get with pointee type is pending removal. Use "
689+
"Context overload.",
690+
"PointerType::get(LLVMContext, AS)")
688691
static PointerType *get(Type *ElementType, unsigned AddressSpace);
689692
/// This constructs an opaque pointer to an object in a numbered address
690693
/// space.
691694
static PointerType *get(LLVMContext &C, unsigned AddressSpace);
692695

693696
/// This constructs a pointer to an object of the specified type in the
694697
/// default address space (address space zero).
698+
LLVM_DEPRECATED("PointerType::getUnqual with pointee type is pending "
699+
"removal. Use Context overload.",
700+
"PointerType::getUnqual(LLVMCOntext)")
695701
static PointerType *getUnqual(Type *ElementType) {
696702
return PointerType::get(ElementType, 0);
697703
}

0 commit comments

Comments
 (0)