Skip to content

Commit d593cf7

Browse files
committed
[IR] Remove deprecated PointerType::getElementType()
This was deprecated before the LLVM 14 branch cut, remove the method now. As a temporary workaround, Type::getPointerElementType() can be used instead. See https://llvm.org/docs/OpaquePointers.html for information on the opaque pointers migration.
1 parent bfb4c0c commit d593cf7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

llvm/include/llvm/IR/DerivedTypes.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,6 @@ class PointerType : public Type {
670670
return get(PT->PointeeTy, AddressSpace);
671671
}
672672

673-
[[deprecated("Pointer element types are deprecated. You can *temporarily* "
674-
"use Type::getPointerElementType() instead")]]
675-
Type *getElementType() const {
676-
assert(!isOpaque() && "Attempting to get element type of opaque pointer");
677-
return PointeeTy;
678-
}
679-
680673
bool isOpaque() const { return !PointeeTy; }
681674

682675
/// Return true if the specified type is valid as a element type.

0 commit comments

Comments
 (0)