[llvm] 40e1f7d - [RISCV] Use llvm::is_contained. NFC (#142239)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 30 22:01:57 PDT 2025


Author: Craig Topper
Date: 2025-05-30T22:01:54-07:00
New Revision: 40e1f7d1e7755726a27d34cb4d601019d376299b

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

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

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 5fd55227024d6..6e8e4ac1c6a95 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -21864,8 +21864,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