[llvm] bf88636 - [ADT] Remove deprecated is and get functions on PointerUnion (#216364)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 12:09:59 PDT 2026


Author: Marc Auberer
Date: 2026-08-14T21:09:54+02:00
New Revision: bf88636fa3f4b1dabf86c60b04176f0ee2b3e887

URL: https://github.com/llvm/llvm-project/commit/bf88636fa3f4b1dabf86c60b04176f0ee2b3e887
DIFF: https://github.com/llvm/llvm-project/commit/bf88636fa3f4b1dabf86c60b04176f0ee2b3e887.diff

LOG: [ADT] Remove deprecated is and get functions on PointerUnion (#216364)

Remove deprecated is and get functions in favor of llvm::{isa,cast}.
There are no more remaining in-tree users.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/PointerUnion.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h
index 93caf86e965b5..6c1a378aadeda 100644
--- a/llvm/include/llvm/ADT/PointerUnion.h
+++ b/llvm/include/llvm/ADT/PointerUnion.h
@@ -295,22 +295,6 @@ class PointerUnion
 
   explicit operator bool() const { return !isNull(); }
 
-  // FIXME: Replace the uses of is(), get() and dyn_cast() with
-  //        isa<T>, cast<T> and the llvm::dyn_cast<T>
-
-  /// Test if the Union currently holds the type matching T.
-  template <typename T> [[deprecated("Use isa instead")]] bool is() const {
-    return isa<T>(*this);
-  }
-
-  /// Returns the value of the specified pointer type.
-  ///
-  /// If the specified pointer type is incorrect, assert.
-  template <typename T> [[deprecated("Use cast instead")]] T get() const {
-    assert(isa<T>(*this) && "Invalid accessor called");
-    return cast<T>(*this);
-  }
-
   /// Returns the current pointer if it is of the specified pointer type,
   /// otherwise returns null.
   template <typename T> inline T dyn_cast() const {


        


More information about the llvm-commits mailing list