[llvm] [ADT] Remove any_isa (NFC) (PR #65636)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 09:50:06 PDT 2023


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/65636:

any_isa has been deprecated since:

  commit bb7940e25f6ca201ca57943544016390f1d2e504
  Author: Sebastian Neubauer <Sebastian.Neubauer at amd.com>
  Date:   Tue Dec 20 13:28:30 2022 +0100


>From 493b24fa8654b611da70c4990a04fc19fcadd50e Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 7 Sep 2023 09:27:52 -0700
Subject: [PATCH] [ADT] Remove any_isa (NFC)

any_isa has been deprecated since:

  commit bb7940e25f6ca201ca57943544016390f1d2e504
  Author: Sebastian Neubauer <Sebastian.Neubauer at amd.com>
  Date:   Tue Dec 20 13:28:30 2022 +0100
---
 llvm/include/llvm/ADT/Any.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h
index 7486491914ef751..89b4d9e5e4052b4 100644
--- a/llvm/include/llvm/ADT/Any.h
+++ b/llvm/include/llvm/ADT/Any.h
@@ -135,12 +135,6 @@ class LLVM_EXTERNAL_VISIBILITY Any {
 // See also https://github.com/llvm/llvm-project/issues/62270
 template <typename T> char Any::TypeId<T>::Id = 1;
 
-template <typename T>
-LLVM_DEPRECATED("Use any_cast(Any*) != nullptr instead", "any_cast")
-bool any_isa(const Any &Value) {
-  return Value.isa<T>();
-}
-
 template <class T> T any_cast(const Any &Value) {
   assert(Value.isa<T>() && "Bad any cast!");
   return static_cast<T>(*any_cast<remove_cvref_t<T>>(&Value));



More information about the llvm-commits mailing list