[llvm] d593cf7 - [IR] Remove deprecated PointerType::getElementType()
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb 14 00:07:59 PST 2022
    
    
  
Author: Nikita Popov
Date: 2022-02-14T09:07:50+01:00
New Revision: d593cf79458a59d37e75c886a4fc3ac6a02b484d
URL: https://github.com/llvm/llvm-project/commit/d593cf79458a59d37e75c886a4fc3ac6a02b484d
DIFF: https://github.com/llvm/llvm-project/commit/d593cf79458a59d37e75c886a4fc3ac6a02b484d.diff
LOG: [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.
Added: 
    
Modified: 
    llvm/include/llvm/IR/DerivedTypes.h
Removed: 
    
################################################################################
diff  --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h
index f52ce3cde318d..92b5c4777514b 100644
--- a/llvm/include/llvm/IR/DerivedTypes.h
+++ b/llvm/include/llvm/IR/DerivedTypes.h
@@ -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.
        
    
    
More information about the llvm-commits
mailing list