From f7fa25fec92acc3b84db90ee77d09da0a36ef8a4 Mon Sep 17 00:00:00 2001 From: Anthony Latsis Date: Wed, 30 Apr 2025 18:01:48 +0100 Subject: [PATCH] [stable/20250402] Revert "[ADT] Deprecate PointerUnion::{is,get} (NFC) (#122623)" This reverts commit abba01adad5dfc54f781357d924c8021c9306615. We will address these deprecations later once all the other failures are dealt with and Swift's release/6.2 starts converging. Right now they're just getting in the way. --- llvm/include/llvm/ADT/PointerUnion.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h index cdbd76d7f505b..7d4ed02b62262 100644 --- a/llvm/include/llvm/ADT/PointerUnion.h +++ b/llvm/include/llvm/ADT/PointerUnion.h @@ -147,18 +147,12 @@ class PointerUnion // isa, cast and the llvm::dyn_cast /// Test if the Union currently holds the type matching T. - template - [[deprecated("Use isa instead")]] - inline bool is() const { - return isa(*this); - } + template inline bool is() const { return isa(*this); } /// Returns the value of the specified pointer type. /// /// If the specified pointer type is incorrect, assert. - template - [[deprecated("Use cast instead")]] - inline T get() const { + template inline T get() const { assert(isa(*this) && "Invalid accessor called"); return cast(*this); }