From 3a49ad025fa603d99f59b916f50e819fde7328cb Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Tue, 30 Sep 2025 09:57:00 -0700 Subject: [PATCH] [llvm][NFC] Simplify implementation of `isa` --- llvm/include/llvm/Support/Casting.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/llvm/include/llvm/Support/Casting.h b/llvm/include/llvm/Support/Casting.h index 66fdcb44ea2c0..2a9a149327d83 100644 --- a/llvm/include/llvm/Support/Casting.h +++ b/llvm/include/llvm/Support/Casting.h @@ -544,14 +544,9 @@ struct CastInfo> : public OptionalValueCast { /// /// if (isa(myVal)) { ... } /// if (isa(myVal)) { ... } -template -[[nodiscard]] inline bool isa(const From &Val) { - return CastInfo::isPossible(Val); -} - -template +template [[nodiscard]] inline bool isa(const From &Val) { - return isa(Val) || isa(Val); + return (CastInfo::isPossible(Val) || ...); } /// cast - Return the argument parameter cast to the specified type. This