[llvm] f0cc373 - [RISCV] Drop unnecessary curly braces in RISCVISAInfo:parse*ArchString. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 10:36:02 PDT 2024


Author: Craig Topper
Date: 2024-04-30T10:35:45-07:00
New Revision: f0cc3735217dd0da36ed14b65823bcb0d289fea6

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

LOG: [RISCV] Drop unnecessary curly braces in RISCVISAInfo:parse*ArchString. NFC

Added: 
    

Modified: 
    llvm/lib/TargetParser/RISCVISAInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TargetParser/RISCVISAInfo.cpp b/llvm/lib/TargetParser/RISCVISAInfo.cpp
index 96f1a7a512020b..5aff936dd993fb 100644
--- a/llvm/lib/TargetParser/RISCVISAInfo.cpp
+++ b/llvm/lib/TargetParser/RISCVISAInfo.cpp
@@ -425,10 +425,10 @@ RISCVISAInfo::parseFeatures(unsigned XLen,
 
 llvm::Expected<std::unique_ptr<RISCVISAInfo>>
 RISCVISAInfo::parseNormalizedArchString(StringRef Arch) {
-  if (llvm::any_of(Arch, isupper)) {
+  if (llvm::any_of(Arch, isupper))
     return createStringError(errc::invalid_argument,
                              "string must be lowercase");
-  }
+
   // Must start with a valid base ISA name.
   unsigned XLen = 0;
   if (Arch.consume_front("rv32"))
@@ -588,10 +588,9 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
                               bool ExperimentalExtensionVersionCheck,
                               bool IgnoreUnknown) {
   // RISC-V ISA strings must be lowercase.
-  if (llvm::any_of(Arch, isupper)) {
+  if (llvm::any_of(Arch, isupper))
     return createStringError(errc::invalid_argument,
                              "string must be lowercase");
-  }
 
   if (Arch.starts_with("rvi") || Arch.starts_with("rva") ||
       Arch.starts_with("rvb") || Arch.starts_with("rvm")) {


        


More information about the llvm-commits mailing list