[clang] [llvm] [RISCV] Remove SeenExtMap from RISCVISAInfo::parseArchString. (PR #97506)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 2 22:36:53 PDT 2024


================
@@ -306,7 +306,7 @@
 // RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_ -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XSEP %s
 // RV32-XSEP: error: invalid arch name 'rv32ixabc_',
-// RV32-XSEP: extension name missing after separator '_'
+// RV32-XSEP: unsupported non-standard user-level extension 'xabc'
----------------
topperc wrote:

It's tested in llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

```
TEST(ParseArchString, RejectsDoubleOrTrailingUnderscore) {                       
  EXPECT_EQ(                                                                     
      toString(RISCVISAInfo::parseArchString("rv64i__m", true).takeError()),     
      "extension name missing after separator '_'");                             
                                                                                 
  for (StringRef Input :                                                         
       {"rv32ezicsr__zifencei", "rv32i_", "rv32izicsr_", "rv64im_"}) {           
    EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),  
              "extension name missing after separator '_'");                     
  }                                                                              
}
```

https://github.com/llvm/llvm-project/pull/97506


More information about the cfe-commits mailing list