Skip to content

Commit

Permalink
[IR] Remove deprecated PointerType::getElementType()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nikic committed Feb 14, 2022
1 parent bfb4c0c commit d593cf7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions llvm/include/llvm/IR/DerivedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,13 +670,6 @@ class PointerType : public Type {
return get(PT->PointeeTy, AddressSpace);
}

[[deprecated("Pointer element types are deprecated. You can *temporarily* "
"use Type::getPointerElementType() instead")]]
Type *getElementType() const {
assert(!isOpaque() && "Attempting to get element type of opaque pointer");
return PointeeTy;
}

bool isOpaque() const { return !PointeeTy; }

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

0 comments on commit d593cf7

Please sign in to comment.