From d593cf79458a59d37e75c886a4fc3ac6a02b484d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 14 Feb 2022 08:49:01 +0100 Subject: [PATCH] [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. --- llvm/include/llvm/IR/DerivedTypes.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h index f52ce3c..92b5c47 100644 --- a/llvm/include/llvm/IR/DerivedTypes.h +++ b/llvm/include/llvm/IR/DerivedTypes.h @@ -670,13 +670,6 @@ public: 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. -- 2.7.4