[llvm] [RISCV] Use llvm::is_contained. NFC (PR #142239)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri May 30 16:40:43 PDT 2025


https://github.com/topperc created https://github.com/llvm/llvm-project/pull/142239

None

>From 0c00024becbede43eea32ae2b5b15546df7f93cf Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Fri, 30 May 2025 16:39:43 -0700
Subject: [PATCH] [RISCV] Use llvm::is_contained. NFC

---
 llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index b7fd0c93fa93f..a8d80f62844e9 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -21863,8 +21863,7 @@ SDValue RISCVTargetLowering::LowerFormalArguments(
         "SiFive-CLIC-stack-swap",
         "SiFive-CLIC-preemptible-stack-swap",
     };
-    if (llvm::find(SupportedInterruptKinds, Kind) ==
-        std::end(SupportedInterruptKinds))
+    if (!llvm::is_contained(SupportedInterruptKinds, Kind))
       report_fatal_error(
         "Function interrupt attribute argument not supported!");
 



More information about the llvm-commits mailing list