Skip to content

Commit 146ad71

Browse files
authored
[IR] Deprecate PointerType::get/getUnqual pointee type overload (llvm#134517)
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. From what my clangd can tell, there are no usages left in the monorepo Part of llvm#123569
1 parent 464286b commit 146ad71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/include/llvm/IR/DerivedTypes.h

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

686686
/// This constructs a pointer to an object of the specified type in a numbered
687687
/// address space.
688+
[[deprecated("PointerType::get with pointee type is pending removal. Use "
689+
"Context overload.")]]
688690
static PointerType *get(Type *ElementType, unsigned AddressSpace);
689691
/// This constructs an opaque pointer to an object in a numbered address
690692
/// space.
691693
static PointerType *get(LLVMContext &C, unsigned AddressSpace);
692694

693695
/// This constructs a pointer to an object of the specified type in the
694696
/// default address space (address space zero).
697+
[[deprecated("PointerType::getUnqual with pointee type is pending removal. "
698+
"Use Context overload.")]]
695699
static PointerType *getUnqual(Type *ElementType) {
696700
return PointerType::get(ElementType, 0);
697701
}

0 commit comments

Comments
 (0)